| QuaternionFCreateRotation Method (Single, Vector3F, Single, Vector3F, Single, Vector3F, Boolean) |
Gets an orientation quaternion from Euler angles (3 rotations around 3 axes).
Namespace: DigitalRune.Mathematics.AlgebraAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static QuaternionF CreateRotation(
float angle1,
Vector3F axis1,
float angle2,
Vector3F axis2,
float angle3,
Vector3F axis3,
bool useGlobalAxes
)
Public Shared Function CreateRotation (
angle1 As Single,
axis1 As Vector3F,
angle2 As Single,
axis2 As Vector3F,
angle3 As Single,
axis3 As Vector3F,
useGlobalAxes As Boolean
) As QuaternionF
public:
static QuaternionF CreateRotation(
float angle1,
Vector3F axis1,
float angle2,
Vector3F axis2,
float angle3,
Vector3F axis3,
bool useGlobalAxes
)
static member CreateRotation :
angle1 : float32 *
axis1 : Vector3F *
angle2 : float32 *
axis2 : Vector3F *
angle3 : float32 *
axis3 : Vector3F *
useGlobalAxes : bool -> QuaternionF
Parameters
- angle1
- Type: SystemSingle
The first angle. - axis1
- Type: DigitalRune.Mathematics.AlgebraVector3F
The first axis. - angle2
- Type: SystemSingle
The second angle. - axis2
- Type: DigitalRune.Mathematics.AlgebraVector3F
The second axis. - angle3
- Type: SystemSingle
The third angle. - axis3
- Type: DigitalRune.Mathematics.AlgebraVector3F
The third axis. - useGlobalAxes
- Type: SystemBoolean
If set to then the rotation axes are fixed in world space. Otherwise
the rotation axes are fixed on the object and rotated with each rotation.
Return Value
Type:
QuaternionF
The orientation quaternion that describes the same orientation as the given Euler angles.
Exceptions Remarks
A rotation is created from 3 sequential rotations. Each rotation is defined by an angle and
the rotation axis. This method can be used to create a quaternion from Euler angle
representations, often named Azimuth/Elevation/Roll, or Heading/Pitch/Roll.
See Also