GET ROTATE MATRIX: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
New page: {{Command|syntax=GET_ROTATE_MATRIX <matrix array>, <vx>, <vy>, <vz>, <angle> |description=*DESCRPTION* |param1=<matrix array>|param1_desc= |param2=<vx>|param2_desc= |param3=<vy>|param3_de...
 
Mikeo (talk | contribs)
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[:Category:Matrices|{{Up}}]]
{{Command|syntax=GET_ROTATE_MATRIX <matrix array>, <vx>, <vy>, <vz>, <angle>
{{Command|syntax=GET_ROTATE_MATRIX <matrix array>, <vx>, <vy>, <vz>, <angle>
|description=*DESCRPTION*
|description=:Get the transformation matrix required to perform a 3D rotation.


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


===Example===
===Example===
:- GET_ROTATE_MATRIX
:DEGREES
:LOCAL MAT1(12)
:GET_ROTATE_MATRIX MAT1, 0, 0, 1, 30
<br>
:This will get a matrix to rotate 30 degrees around the Z axis.


[[Category:Matrices]]
[[Category:Matrices]]

Latest revision as of 18:09, 12 January 2011

Up

Command

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


Get the transformation matrix required to perform a 3D rotation.

Parameters

<matrix array>
Name of Matrix variable
<vx>
the X component of a vector.
<vy>
the Y component of a vector.
<vz>
the Z component of a vector.
<angle>
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.