Go to the
first,
previous,
next,
last section,
table of contents.
source files: [xc]tfm.[ch]
SYNTAX
(SEND <tfm> :DECOMPOSE)
DESCRIPTION
Decompose a non-degenerate 4x4 transformation matrix <tfm> into the
sequence of transformations that produced it. If the matrix can be
decomposed, the call will return a property list with the following
attributes:
- :SCALE (x y z)
-
Scaling factors relative to the X, Y, and Z axes.
- :SHEAR (x/y x/z y/z)
-
Three shear factors: X relative to Y, X relative to Z, and Y relative
to Z. These correspond to the first, second, and fourth coefficients of
the :SHEAR method.
- :ROTATE (x y z)
-
Angles of rotation about the X, Y, and Z axes respectively, specified in
radians.
- :MOVE (x y z)
-
Translation in X, Y, and Z directions.
- :PERSPECTIVE (x y z w)
-
Four perspective coefficients. (Skandha doesn't currently have a way to
add perspective to a transform matrix directly, so these four values
will probably be zero all the time.)
If the matrix is singular and can't be decomposed, this call will return
NIL.
Note that the order in which these separate transformations are applied
matters. To reconstruct the original matrix <tfm>, the components
should be applied in the following order:
[Sx][Sy][Sz][Shearx/y][Sx/z][Sz/y][Rx][Ry][Rz][Tx][Ty][Tz][P(x,y,z,w)]
Go to the
first,
previous,
next,
last section,
table of contents.