|
Matrix4x4ExtractYawPitchRoll Method
|
Extract rotation angles from the rotation matrix.
Namespace:
Accord.Math
Assembly:
Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax public void ExtractYawPitchRoll(
out float yaw,
out float pitch,
out float roll
)
Public Sub ExtractYawPitchRoll (
<OutAttribute> ByRef yaw As Single,
<OutAttribute> ByRef pitch As Single,
<OutAttribute> ByRef roll As Single
)
Request Example
View SourceParameters
- yaw
- Type: SystemSingle
Extracted rotation angle around Y axis in radians. - pitch
- Type: SystemSingle
Extracted rotation angle around X axis in radians. - roll
- Type: SystemSingle
Extracted rotation angle around Z axis in radians.
Remarks Note |
---|
The method assumes the provided matrix represent valid rotation matrix. |
Sample usage:
float yaw = 10.0f / 180 * Math.PI;
float pitch = 30.0f / 180 * Math.PI;
float roll = 45.0f / 180 * Math.PI;
Matrix4x4 rotationMatrix = Matrix3x3.CreateFromYawPitchRoll( yaw, pitch, roll );
float extractedYaw;
float extractedPitch;
float extractedRoll;
rotation.ExtractYawPitchRoll( out extractedYaw, out extractedPitch, out extractedRoll );
See Also