Difference between revisions of "Matrix.fromSRT"
From GiderosMobile
m |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
Builds a matrix from scale/rotation/translation components. | Builds a matrix from scale/rotation/translation components. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(matrix) = Matrix.fromSRT(srt,reverse) | (matrix) = Matrix.fromSRT(srt,reverse) | ||
− | </ | + | </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: | ||
* '''s''' or '''scale''': the matrix scale component | * '''s''' or '''scale''': the matrix scale component |
Latest revision as of 14: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
- Matrix
- Matrix.fromSRT
- Matrix.new
- Matrix:duplicate
- Matrix:getAnchorPosition
- Matrix:getElements
- Matrix:getM11
- Matrix:getM12
- Matrix:getM21
- Matrix:getM22
- Matrix:getMatrix
- Matrix:getPosition
- Matrix:getRotationX
- Matrix:getRotationY
- Matrix:getRotationZ
- Matrix:getScale
- Matrix:getScaleX
- Matrix:getScaleY
- Matrix:getScaleZ
- Matrix:getTx
- Matrix:getTy
- Matrix:getTz
- Matrix:getX
- Matrix:getY
- Matrix:getZ
- Matrix:invert
- Matrix:multiply
- Matrix:orthographicProjection
- Matrix:perspectiveProjection
- Matrix:rotate
- Matrix:scale
- Matrix:setAnchorPosition
- Matrix:setElements
- Matrix:setM11
- Matrix:setM12
- Matrix:setM21
- Matrix:setM22
- Matrix:setMatrix
- Matrix:setPosition
- Matrix:setRotationX
- Matrix:setRotationY
- Matrix:setRotationZ
- Matrix:setScale
- Matrix:setScaleX
- Matrix:setScaleY
- Matrix:setScaleZ
- Matrix:setTx
- Matrix:setTy
- Matrix:setTz
- Matrix:setX
- Matrix:setY
- Matrix:setZ
- Matrix:transformPoint
- Matrix:translate