MAKE MATRIX4 This command will create a MATRIX4 data item.
Syntax
    Return Integer=MAKE MATRIX4(Matrix4)
Parameters
    Matrix4
Integer matrix4
Returns
Description
Unlike the datatypes you are used to, these datatypes are stored internally and referenced by an index value. The MATRIX4 datatype contains sixteen float values representing a 4x4 matrix of data. This is a typical 3D matrix used in many advanced 3D calculations. You can imagine the grid headed with columns X,Y,Z,W by rows X,Y,Z,W.
Example Code
    r=MAKE MATRIX4(1)

    r=MAKE MATRIX4(2)

    r=MAKE MATRIX4(3)

    SET IDENTITY MATRIX4 1

    SET IDENTITY MATRIX4 2

    SET IDENTITY MATRIX4 3

    IF IS IDENTITY MATRIX4(1)=1

    IF IS EQUAL MATRIX4(2,3)=1

    VIEW MATRIX4 1

    WORLD MATRIX4 2

    PROJECTION MATRIX4 3

    TRANSLATE MATRIX4 1,0,50,200

    ROTATE X MATRIX4 1,45

    ROTATE Y MATRIX4 1,45

    ROTATE Z MATRIX4 1,45

    ROTATE YPR MATRIX4 1,45,45,45

    SCALE MATRIX4 1,250,250,250

    TRANSPOSE MATRIX4 1,1

    r=INVERSE MATRIX4(1,1)

    ENDIF

    ENDIF

    COPY MATRIX4 1,2

    ADD MATRIX4 1,2,3

    SUBTRACT MATRIX4 1,2,3

    MULTIPLY MATRIX4 1,2,3

    MULTIPLY MATRIX4 1,100

    DIVIDE MATRIX4 1,100

    r=DELETE MATRIX4(1)

    r=DELETE MATRIX4(2)

    r=DELETE MATRIX4(3)
See also
3DMATHS Commands Menu Index