MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Decompose

Method Decompose

Source/Engine/Core/Math/Matrix.cpp:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void Matrix::Decompose(float& yaw, float& pitch, float& roll) const
82{
83 pitch = Math::Asin(-M32);
84 if (Math::Cos(pitch) > 1e-12f)
85 {
86 roll = Math::Atan2(M12, M22);
87 yaw = Math::Atan2(M31, M33);
88 }
89 else
90 {
91 roll = Math::Atan2(-M21, M11);
92 yaw = 0.0f;
93 }
94}
95
96void Matrix::Decompose(Float3& scale, Float3& translation) const
97{

Callers 15

UIControlClass · 0.45
UICanvasClass · 0.45
Intersects3DMethod · 0.45
RetargetNodeMethod · 0.45
TransformMethod · 0.45
OrientedBoundingBoxMethod · 0.45
TransformMethod · 0.45
OrientedBoundingBoxMethod · 0.45
TransformMethod · 0.45
TransformMethod · 0.45
GetWireBoxFunction · 0.45
UpdateTransformationMethod · 0.45

Calls 12

Float3Class · 0.85
RotationMatrixFunction · 0.85
DotFunction · 0.85
AsinFunction · 0.70
CosFunction · 0.70
Atan2Function · 0.70
SqrtFunction · 0.70
GetRightFunction · 0.70
GetForwardFunction · 0.70
MatrixFunction · 0.70
IsAnyZeroMethod · 0.45
SetUpMethod · 0.45

Tested by

no test coverage detected