Value (SIMatrix3)

Description

Sets or returns the (i,j)th value (Double) of the 3x3 matrix, where i are rows and j are columns.

| m[0,0] m[0,1] m[0,2] |

| m[1,0] m[1,1] m[1,2] |

| m[2,0] m[2,1] m[2,2] |

Tip: Value is the SIMatrix3 object's default property, which means that you can call the method by just using the parenthesis and leaving out the property name for example m(i,j).

C# Syntax

    // get accessor
    Double ISIMatrix3.get_Value( Int16 in_nRow, Int16 in_nCol );

    // set accessor
    ISIMatrix3.set_Value( Int16 in_nRow, Int16 in_nCol, Double pVal );

Parameters

Parameter | Type | Description
i | Integer | Specifies the row index.
j | Integer | Specifies the column index.

Examples

VBScript Example

    ' Create a cube and rotate
    NewScene , false
    CreatePrim "Cube", "MeshSurface"
    Rotate , -120.375, 0, 0, siRelative, siLocal, siObj, siXYZ
    Rotate , 0, 0, -56.25, siRelative, siLocal, siObj, siXYZ
    Rotate , 0, -51.75, 0, siRelative, siLocal, siObj, siXYZ

    ' get the cube from the selection and access its global
    ' kinematic state property to get at its global transform
    set o = selection(0)
    set gks = o.kinematics.global
    set t = gks.transform

    set m = xsimath.creatematrix3

    t.GetRotationMatrix3 m

    Application.LogMessage "matrix3.value(j,i)" & vbCrLf & _
       "|"&FormatNumber(m(0,0),3)&" "&FormatNumber(m(0,1),3)&" "&FormatNumber(m(0,2),3)&"|"& vbCrLf & _
       "|"&FormatNumber(m(1,0),3)&" "&FormatNumber(m(1,1),3)&" "&FormatNumber(m(1,2),3)&"|"& vbCrLf & _
       "|"&FormatNumber(m(2,02),3)&" "&FormatNumber(m(2,1),3)&" "&FormatNumber(m(2,2),3)&"|"& vbCrLf

    m.get m0, m1, m2, m3, m4, m5, m6, m7, m8
       Application.LogMessage "matrix3.get" & vbCrLf & _
       "|"&FormatNumber(m0,3)&" "&FormatNumber(m1,3)&" "&FormatNumber(m2,3)&"|"& vbCrLf & _
       "|"&FormatNumber(m3,3)&" "&FormatNumber(m4,3)&" "&FormatNumber(m5,3)&"|"& vbCrLf & _
       "|"&FormatNumber(m6,3)&" "&FormatNumber(m7,3)&" "&FormatNumber(m8,3)&"|"& vbCrLf
    'INFO : "matrix3.value(j,i)
    '|0.344 0.938 0.047|
    '|0.831 -0.281 -0.479|
    '|-0.876 0.204 -0.876|
    '"
    'INFO : "matrix3.get
    '|0.344 0.938 0.047|
    '|0.831 -0.281 -0.479|
    '|-0.436 0.204 -0.876|
    '"

Autodesk Softimage v7.5