Difference between revisions of "Matrix.fromSRT"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 6: Line 6:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(matrix) = Matrix.fromSRT(srt,reverse)
 
(matrix) = Matrix.fromSRT(srt,reverse)
</source>
+
</syntaxhighlight>
  
 
The scale/rotate/translate specification is given by a table, which can have the following fields:
 
The scale/rotate/translate specification is given by a table, which can have the following fields:

Latest revision as of 15:30, 13 July 2023

Available since: Gideros 2021.11
Class: Matrix

Description

Builds a matrix from scale/rotation/translation components.

(matrix) = Matrix.fromSRT(srt,reverse)

The scale/rotate/translate specification is given by a table, which can have the following fields:

  • s or scale: the matrix scale component
  • r or rotation: the matrix rotation component (a quaternion)
  • t or translate or position: the matrix translation component

Parameters

srt: (table) scale, rotate, translate specification
reverse: (boolean) build a matrix where component application is reverted

Return values

Returns (matrix) the matrix object