Matrix.fromSRT

From GiderosMobile
Revision as of 08:39, 19 November 2021 by Hgy29 (talk | contribs) (Created page with "'''Available since:''' Gideros 2021.11<br/> '''Class:''' Matrix<br/> === Description === Builds a matrix from scale/rotation/translation components. The scale/rotate/tran...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2021.11
Class: Matrix

Description

Builds a matrix from scale/rotation/translation components. 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
(matrix) = Matrix.fromSRT(srt,reverse)

Parameters

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

Return values

Returns (matrix) The matrix object