Back to class index
float3x4[Class Summary]
v
zero[static][const]
identity[static][const]
nan[static][const]
ctor (+7 overloads)
GetScale()[const]
operator[](row) (+1 overload)
At(row,col) (+1 overload)
Row(row) (+1 overload)
Row3(row) (+1 overload)
Col(col)[const]
Col3(col)[const]
Diagonal()[const]
ScaleRow3(row,scalar)
ScaleRow(row,scalar)
ScaleCol(col,scalar)
Float3x3Part()[const]
TranslatePart()[const]
RotatePart()[const]
PositiveX/Y/Z()[const]
ptr() (+1 overload)
SetRow(row,rowVector,m_r3) (+3 overloads)
SetCol(...) (+2 overloads)
Set(...) (+3 overloads)
Set3x3Part(rotation)
SetIdentity()
SwapColumns(col1,col2)
SwapRows(row1,row2)
SetTranslatePart(tx,ty,tz) (+1 overload)
SetRotatePart/X/Y/Z(...) (+2 overloads)
operator=(rhs) (+2 overloads)
Determinant()[const]
Inverse()
Inverted()[const]
InverseColOrthogonal()
InverseOrthogonalUniformScale()
InverseOrthonormal()
Transpose3()
Transposed3()[const]
InverseTranspose()
InverseTransposed()[const]
Trace()[const]
Orthonormalize(...)
RemoveScale()
TransformPos(pointVector)[const] (+1 overload)
TransformDir(directionVector)[const] (+1 overload)
Transform(vector)[const]
BatchTransformPos(...)[const] (+1 overload)
BatchTransformDir(...)[const] (+1 overload)
BatchTransform(...)[const] (+1 overload)
operator*(rhs)[const] (+4 overloads)
operator/(scalar)[const]
operator+(rhs)[const]
operator-(rhs)[const] (+1 overload)
operator*=(scalar)
operator/=(scalar)
operator+=(rhs)
operator-=(rhs)
IsFinite()[const]
IsIdentity(epsilon)[const]
IsLowerTriangular(epsilon)[const]
IsUpperTriangular(epsilon)[const]
IsInvertible(epsilon)[const]
IsSymmetric(epsilon)[const]
IsSkewSymmetric(epsilon)[const]
HasUnitaryScale(epsilonSq)[const]
HasNegativeScale()[const]
HasUniformScale(epsilon)[const]
IsRowOrthogonal(epsilon)[const]
IsColOrthogonal(epsilon)[const]
IsColOrthogonal3(epsilon)[const]
IsOrthonormal(epsilon)[const]
Equals(other,epsilon)[const]
ToEuler***()[const]
ExtractScale()[const]
Decompose(...)[const] (+2 overloads)
Mul(rhs)[const] (+3 overloads)
MulPos(pointVector)[const]
MulDir(directionVector)[const]
Mul(vector)[const]
Translate(tx,ty,tz)[static] (+1 overload)
RotateX/Y/Z(angleRadians)[static] (+1 overload)
RotateAxisAngle(...)[static] (+1 overload)
RotateFromTo(...)[static] (+1 overload)
RandomGeneral(...)[static]
FromQuat(orientation)[static] (+1 overload)
FromTRS(...)[static] (+2 overloads)
FromEuler***(ex,ey,ex2)[static]
Scale(sx,sy,sz)[static] (+2 overloads)
ScaleAlongAxis(axis,scalingFactor)[static] (+1 overload)
UniformScale(uniformScale)[static] (+1 overload)
ShearX/Y/Z(yFactor,zFactor)[static]
Mirror(p)[static]
OrthographicProjection/YZ/XZ/XY(...)[static] (+1 overload)
LookAt(...)[static]

float3x4::Decompose

Syntax

void float3x4::Decompose(float3 &translate, Quat &rotate, float3 &scale) const; [11 lines of code]
void float3x4::Decompose(float3 &translate, float3x3 &rotate, float3 &scale) const; [19 lines of code]
void float3x4::Decompose(float3 &translate, float3x4 &rotate, float3 &scale) const; [12 lines of code]

Decomposes this matrix to translate, rotate and scale parts.

This function decomposes this matrix M to a form M = T * R * S, where T is a translation matrix, R a rotation matrix and S a scale matrix.

Note
Remember that in the convention of this class, transforms are applied in the order M * v, so scale is applied first, then rotation, and finally the translation last. This function assumes that this matrix does not contain projection (the fourth row of this matrix is [0 0 0 1]).

Parameters

float3 &translate [out]This vector receives the translation component this matrix performs. The translation is applied last after rotation and scaling.Quat &rotate [out]This object receives the rotation part of this transform.float3 &scale [out]This vector receives the scaling along the local (before transformation by R) X, Y and Z axes performed by this matrix.

Performance

void float3x4::Decompose(float3 &translate, Quat &rotate, float3 &scale) const

0.131μsecs/call ≈ 7.61M calls/second ≈ 126.87k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

void float3x4::Decompose(float3 &translate, float3x3 &rotate, float3 &scale) const

0.057μsecs/call ≈ 17.4M calls/second ≈ 289.99k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

void float3x4::Decompose(float3 &translate, float3x4 &rotate, float3 &scale) const

0.074μsecs/call ≈ 13.53M calls/second ≈ 225.55k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index