Extract rotation angles from the rotation matrix.
Namespace:
AForge.MathAssembly: AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
Parameters
- yaw
- Type:
System..::.Single
%
Extracted rotation angle around Y axis in radians.
- pitch
- Type:
System..::.Single
%
Extracted rotation angle around X axis in radians.
- roll
- Type:
System..::.Single
%
Extracted rotation angle around Z axis in radians.
Remarks


Sample usage:

// assume we have a rotation matrix created like this float yaw = 10.0f / 180 * Math.PI; float pitch = 30.0f / 180 * Math.PI; float roll = 45.0f / 180 * Math.PI; Matrix3x3 rotationMatrix = Matrix3x3.CreateFromYawPitchRoll( yaw, pitch, roll ); // ... // now somewhere in the code you may want to get rotation // angles back from a matrix assuming same rotation order float extractedYaw; float extractedPitch; float extractedRoll; rotation.ExtractYawPitchRoll( out extractedYaw, out extractedPitch, out extractedRoll );