Click or drag to resize
DigitalRuneQuaternionDCreateRotation Method (Double, Vector3D, Double, Vector3D, Double, Vector3D, 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 QuaternionD CreateRotation(
	double angle1,
	Vector3D axis1,
	double angle2,
	Vector3D axis2,
	double angle3,
	Vector3D axis3,
	bool useGlobalAxes
)

Parameters

angle1
Type: SystemDouble
The first angle.
axis1
Type: DigitalRune.Mathematics.AlgebraVector3D
The first axis.
angle2
Type: SystemDouble
The second angle.
axis2
Type: DigitalRune.Mathematics.AlgebraVector3D
The second axis.
angle3
Type: SystemDouble
The third angle.
axis3
Type: DigitalRune.Mathematics.AlgebraVector3D
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: QuaternionD
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