#include "maxheap.h"
#include "point3.h"
#include "quat.h"
Go to the source code of this
file.
Function Documentation
- Parameters:
- Matrix3
m
The input matrix to decompose.
Point3
&s
The scale from the matrix.
Quat& q
The rotation of the matrix.
- Parameters:
- Matrix3
A
The input matrix to decompose.
AffineParts
*parts
The result. See above.
- Sample Code:
- Note: If you want to rebuild a Matrix3 from the decomposed parts you get
back from decomp_affine()
the important thing is the order the parts are combined.
Consider the following matrices constructed from the various affine
parts:
ptm = position component (t)
rtm = "essential" rotation (q)
srtm = "stretch" rotation (u)
stm = scale component (k)
ftm = the flip tm -> ScaleMatrix(Point3(ap.f,ap.f,ap.f));
Here's the correct way of reassembling the decomposed matrix: