MULTIPLY MATRIX: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
New page: {{Command|syntax=MULTIPLY_MATRIX <matrix array 1>, <matrix array 2>, <result matrix> |description=*DESCRPTION* |param1=<matrix array 1>|param1_desc= |param2=<matrix array 2>|param2_desc= ... |
mNo edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[:Category:Matrices|{{Up}}]] | |||
{{Command|syntax=MULTIPLY_MATRIX <matrix array 1>, <matrix array 2>, <result matrix> | {{Command|syntax=MULTIPLY_MATRIX <matrix array 1>, <matrix array 2>, <result matrix> | ||
|description= | |description=:Get a matrix that is the result of multiplying 2 matrices together. | ||
|param1=<matrix array 1>|param1_desc= | |param1=<matrix array 1>|param1_desc={{parameter_variable_matrix}} for first matrix | ||
|param2=<matrix array 2>|param2_desc= | |param2=<matrix array 2>|param2_desc={{parameter_variable_matrix}} for second matrix | ||
|param3=<result matrix>|param3_desc= | |param3=<result matrix>|param3_desc={{parameter_variable_matrix}} for the result of multiplying first matrix by second matrix | ||
}} | }} | ||
===Example=== | ===Example=== | ||
: | :LOCAL M1(12), M2(12), M3(12) | ||
<br> | |||
:GET_TRANSLATION_MATRIX M1, 2.5, 0, 0 | |||
:GET_SCALE_MATRIX M2, 3 | |||
:MULTIPLY_MATRIX M1, M2, M3 | |||
<br> | |||
:This will get the matrix that is a translation (2,5 in X) multiplied by a scale of 3. | |||
[[Category:Matrices]] | [[Category:Matrices]] | ||
Latest revision as of 17:29, 17 March 2011
Command
- MULTIPLY_MATRIX <matrix array 1>, <matrix array 2>, <result matrix>
- Get a matrix that is the result of multiplying 2 matrices together.
Parameters
- <matrix array 1>
- Name of Matrix variable for first matrix
- <matrix array 2>
- Name of Matrix variable for second matrix
- <result matrix>
- Name of Matrix variable for the result of multiplying first matrix by second matrix
Example
- LOCAL M1(12), M2(12), M3(12)
- GET_TRANSLATION_MATRIX M1, 2.5, 0, 0
- GET_SCALE_MATRIX M2, 3
- MULTIPLY_MATRIX M1, M2, M3
- This will get the matrix that is a translation (2,5 in X) multiplied by a scale of 3.