GET ROTATE MATRIX: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
No edit summary
ConnerO (talk | contribs)
No edit summary
Line 3: Line 3:


|param1=<matrix array>|param1_desc={{matrix array}}
|param1=<matrix array>|param1_desc={{matrix array}}
|param2=<vx>|param2_desc={{vx}}
|param2=<vx>|param2_desc={{getvx}}
|param3=<vy>|param3_desc={{vy}}
|param3=<vy>|param3_desc={{getvy}}
|param4=<vz>|param4_desc={{vz}}
|param4=<vz>|param4_desc={{getvz}}
|param5=<angle>|param5_desc={{angle}}
|param5=<angle>|param5_desc={{getangle}}
}}
}}



Revision as of 21:08, 27 July 2010

Command

GET_ROTATE_MATRIX <matrix array>, <vx>, <vy>, <vz>, <angle>


Set an array variable to the transformation matrix required to perform a 3D rotation.

Parameters

<matrix array>
A transformation matrix contains 12 values. These are stored in an array variable that must be defined to hold at least 12 values. If the array variable is defined with a size of more than 12, the first 12 values are used for the transformation matrix.
<vx>
Set the value of a number variable for the the X component of a vector.
<vy>
Set the value of a number variable for the the Y component of a vector.
<vz>
Set the value of a number variable for the the Z component of a vector.
<angle>
Set the value of a number variable for the angle value, either degrees or radians. Positive angles indicate a CCW direction, negative for CW.

Use the DEGREES or RADIANS commands to switch between the two angle modes.

Example

DEGREES
LOCAL MAT1(12)
GET_ROTATE_MATRIX MAT1, 0, 0, 1, 30


This will get a matrix to rotate 30 degrees around the Z axis.