Click or drag to resize
DigitalRuneQuaternionFCreateRotation Method (Single, Vector3F, Single, Vector3F, Single, Vector3F, Boolean)
Gets an orientation quaternion from Euler angles (3 rotations around 3 axes).

Namespace: DigitalRune.Mathematics.Algebra
Assembly: 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
)

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
ExceptionCondition
MathematicsException The length of the axis vectors must not be 0.
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