TRANSLATE MATRIX: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{Command|syntax=TRANSLATE_MATRIX <matrix array>, <dx>, <dy>, <dz>, | {{Command|syntax=TRANSLATE_MATRIX <matrix array>, <dx>, <dy>, <dz>, | ||
|description= | |description=:Modify a matrix by applying a translation. | ||
|param1=<matrix array>|param1_desc={{ | |param1=<matrix array>|param1_desc={{parameter_variable_matrix}} | ||
|param2=<dx>|param2_desc={{dx}} | |param2=<dx>|param2_desc={{dx}} | ||
|param3=<dy>|param3_desc={{dy}} | |param3=<dy>|param3_desc={{dy}} | ||
|param4=<dz>|param4_desc= {{dz}} | |param4=<dz>|param4_desc={{dz}} | ||
}} | }} | ||
===Example=== | ===Example=== | ||
:TRANSLATE_MATRIX | :GLOBAL Matrix1(12) | ||
<br> | |||
:GET_SCALE_MATRIX Matrix1, 0.25 | |||
:TRANSLATE_MATRIX Matrix1, 3, 1, -2 | |||
<br> | |||
This will get a matrix to scale to 1/4 size, then translate by 3 in X, 1 in Y and -2 in Z. | |||
[[Category:Matrices]] | [[Category:Matrices]] |
Revision as of 18:22, 12 January 2011
Command
- TRANSLATE_MATRIX <matrix array>, <dx>, <dy>, <dz>,
- Modify a matrix by applying a translation.
Parameters
- <matrix array>
- Name of Matrix variable
- <dx>
- The distance in the X axis direction.
- <dy>
- The distance in the Y axis direction.
- <dz>
- The distance in the Z axis direction.
Example
- GLOBAL Matrix1(12)
- GET_SCALE_MATRIX Matrix1, 0.25
- TRANSLATE_MATRIX Matrix1, 3, 1, -2
This will get a matrix to scale to 1/4 size, then translate by 3 in X, 1 in Y and -2 in Z.