{{newin|[[11.0]]|110|type=function}}
Directly sets the Transform's internal 4x4 transformation matrix.

== Function ==
=== Synopsis ===
<source lang="lua">
transform = Transform:setMatrix( e1_1, e1_2, ..., e4_4 )
</source>
=== Arguments ===
{{param|number|e1_1|The first column of the first row of the matrix.}}
{{param|number|e1_2|The second column of the first row of the matrix.}}
{{param|number|...|Additional matrix elements.}}
{{param|number|e4_4|The fourth column of the fourth row of the matrix.}}
=== Returns ===
{{param|Transform|transform|The Transform object the method was called on. Allows easily chaining Transform methods.}}

== Function ==
=== Synopsis ===
<source lang="lua">
transform = Transform:setMatrix( layout, e1_1, e1_2, ..., e4_4 )
</source>
=== Arguments ===
{{param|MatrixLayout|layout|How to interpret the matrix element arguments (row-major or column-major).}}
{{param|number|e1_1|The first column of the first row of the matrix.}}
{{param|number|e1_2|The second column of the first row or the first column of the second row of the matrix, depending on the specified layout.}}
{{param|number|...|Additional matrix elements.}}
{{param|number|e4_4|The fourth column of the fourth row of the matrix.}}
=== Returns ===
{{param|Transform|transform|The Transform object the method was called on. Allows easily chaining Transform methods.}}

== Function ==
=== Synopsis ===
<source lang="lua">
transform = Transform:setMatrix( layout, matrix )
</source>
=== Arguments ===
{{param|MatrixLayout|layout|How to interpret the matrix element arguments (row-major or column-major).}}
{{param|table|matrix|A flat table containing the 16 matrix elements.}}
=== Returns ===
{{param|Transform|transform|The Transform object the method was called on. Allows easily chaining Transform methods.}}

== Function ==
=== Synopsis ===
<source lang="lua">
transform = Transform:setMatrix( layout, matrix )
</source>
=== Arguments ===
{{param|MatrixLayout|layout|How to interpret the matrix element arguments (row-major or column-major).}}
{{param|table|matrix|A table of 4 tables, with each sub-table containing 4 matrix elements.}}
=== Returns ===
{{param|Transform|transform|The Transform object the method was called on. Allows easily chaining Transform methods.}}

== See Also ==
* [[parent::Transform]]
* [[Transform:getMatrix]]
[[Category:Functions]]
{{#set:Description=Directly sets the Transform's internal transformation matrix.}}
== Other Languages ==
{{i18n|Transform:setMatrix}}