QuaternionF Structure |
Namespace: DigitalRune.Mathematics.Algebra
The QuaternionF type exposes the following members.
Name | Description | |
---|---|---|
QuaternionF(IListSingle) |
Initializes a new instance of the QuaternionF class.
| |
QuaternionF(Single) |
Initializes a new instance of the QuaternionF class.
| |
QuaternionF(Single, Vector3F) |
Initializes a new instance of the QuaternionF class.
| |
QuaternionF(Single, Single, Single, Single) |
Initializes a new instance of the QuaternionF class.
|
Name | Description | |
---|---|---|
Add |
Adds two quaternions.
| |
AreNumericallyEqual(QuaternionF, QuaternionF) |
Tests if two quaternions are equal (within the tolerance
EpsilonF).
| |
AreNumericallyEqual(QuaternionF, QuaternionF, Single) |
Tests if two quaternions are equal (with a specific tolerance).
| |
Conjugate |
Sets this quaternion to its conjugate.
| |
CreateRotation(Matrix33F) |
Creates a unit quaternion that specifies the same rotation as the given rotation matrix.
| |
CreateRotation(Vector3F, Vector3F) |
Creates a unit quaternion that specifies a rotation given by two vectors.
| |
CreateRotation(Vector3F, Single) |
Creates a unit quaternion that specifies a rotation given by axis and angle.
| |
CreateRotation(Single, Vector3F, Single, Vector3F, Single, Vector3F, Boolean) |
Gets an orientation quaternion from Euler angles (3 rotations around 3 axes).
| |
CreateRotationX |
Creates a unit quaternion that specifies a rotation by a given angle around the x-axis.
| |
CreateRotationY |
Creates a unit quaternion that specifies a rotation by a given angle around the y-axis.
| |
CreateRotationZ |
Creates a unit quaternion that specifies a rotation by a given angle around the z-axis.
| |
Divide(QuaternionF, QuaternionF) |
Divides a quaternions by another quaternion.
| |
Divide(QuaternionF, Single) |
Divides a quaternion by a scalar.
| |
Dot |
Returns the dot product of two quaternions.
| |
Equals(Object) |
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).) | |
Equals(QuaternionF) |
Indicates whether the current object is equal to another object of the same type.
| |
Exp |
Sets this quaternion to its exponential.
| |
Exp(QuaternionF) |
Calculates the exponential.
| |
FromXna |
Converts this QuaternionF (DigitalRune Mathematics) to
Quaternion (XNA Framework).
| |
GetAngle |
Calculates the angle between two quaternions.
| |
GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Invert |
Inverts the quaternion.
| |
Ln |
Sets this quaternion to its natural logarithm.
| |
Ln(QuaternionF) |
Calculates the natural logarithm.
| |
Multiply(Single, QuaternionF) |
Multiplies a quaternion by a scalar.
| |
Multiply(QuaternionF, QuaternionF) |
Multiplies two quaternions.
| |
Negate |
Negates a quaternion.
| |
Normalize |
Normalizes the quaternion.
| |
Parse(String) |
Converts the string representation of a quaternion to its QuaternionF
equivalent.
| |
Parse(String, IFormatProvider) |
Converts the string representation of a quaternion in a specified culture-specific format to
its QuaternionF equivalent.
| |
Power(Single) |
Sets this unit quaternion to a power of itself.
| |
Power(QuaternionF, Single) |
Calculates the power of a unit quaternion.
| |
Rotate |
Rotates a vector.
| |
Subtract |
Subtracts a quaternion from a quaternion.
| |
ToArray |
Converts the quaternion to an array of 4 float values: (w, x, y, z).
| |
ToList |
Converts the vector to a list of 4 float values: (w, x, y, z).
| |
ToQuaternionD |
Converts this QuaternionF to QuaternionD.
| |
ToRotationMatrix33 |
Returns the 3 x 3 rotation matrix of this quaternion.
| |
ToRotationMatrix44 |
Returns the 4 x 4 rotation matrix of this quaternion.
| |
ToString |
Returns the string representation of this quaternion.
(Overrides ValueTypeToString.) | |
ToString(IFormatProvider) |
Returns the string representation of this vector using the specified culture-specific format
information.
| |
ToXna |
Converts this QuaternionF (DigitalRune Mathematics) to
Quaternion (XNA Framework).
| |
TryNormalize |
Tries to normalize the quaternion.
|
Name | Description | |
---|---|---|
Addition |
Adds two quaternions.
| |
Division(QuaternionF, QuaternionF) |
Divides a quaternions by another quaternion.
| |
Division(QuaternionF, Single) |
Divides a quaternion by a scalar.
| |
Equality |
Tests if two quaternions are equal.
| |
(Quaternion to QuaternionF) |
Performs an conversion from Quaternion (XNA Framework) to
QuaternionF (DigitalRune Mathematics).
| |
(QuaternionF to Single) |
Converts the quaternion to an array of 4 float values: (w, x, y, z).
| |
(QuaternionF to ListSingle) |
Converts the vector to a list of 4 float values: (w, x, y, z).
| |
(QuaternionF to Quaternion) |
Performs an conversion from QuaternionF (DigitalRune Mathematics) to
Quaternion (XNA Framework).
| |
(QuaternionF to QuaternionD) |
Performs an implicit conversion from QuaternionF to QuaternionD.
| |
Inequality |
Tests if two quaternions are not equal.
| |
Multiply(Single, QuaternionF) |
Multiplies a quaternion by a scalar.
| |
Multiply(QuaternionF, QuaternionF) |
Multiplies two quaternions.
| |
Multiply(QuaternionF, Single) |
Multiplies a quaternion by a scalar.
| |
Subtraction |
Subtracts a quaternion from a quaternion.
| |
UnaryNegation |
Negates a quaternion.
|
Name | Description | |
---|---|---|
Identity |
Returns the identity QuaternionF (1, 0, 0, 0).
| |
W |
The w component.
| |
X |
The x component.
| |
Y |
The y component.
| |
Z |
The z component.
| |
Zero |
Returns a QuaternionF with all of its components set to zero.
|
Name | Description | |
---|---|---|
Angle |
Gets or sets the angle of the rotation around Axis.
| |
Axis |
Gets or sets the normalized unit vector with the direction of the rotation axis.
| |
Conjugated |
Returns the conjugate of the quaternion.
| |
Inverse |
Returns the inverse of this quaternion.
| |
IsNaN |
Gets a value indicating whether a component of the quaternion is NaN.
| |
IsNumericallyNormalized |
Returns a value indicating whether this quaternion is normalized (the Modulus
is numerically equal to 1).
| |
Item |
Gets or sets the component at the specified index.
| |
Modulus |
Returns the modulus (length).
| |
Norm |
Returns the norm (length2).
| |
Normalized |
Returns the normalized quaternion.
| |
V |
Gets or sets the vector part (x, y, z).
|
A quaternion consists of a scalar component w and a vector component v = (x, y, z). Alternatively it can be represented as a complex number with three imaginary parts w + ix + jy + kz, or as a 4-dimensional vector (w, x, y, z)
Due to common notation, the quaternion components are stored in the order: (w, x, y, z).
Unit Quaternions:
A unit quaternion is a quaternion q where N(q) = 1. (See Norm.) A unit quaternion can be represented by
q = cosθ + usinθ,
where u as a 3D vector has a length of 1. By applying Euler's identity for complex numbers the quaternion can be written in exponential notation:
q = euθ = cosθ + usinθ
Several methods, such as Ln(QuaternionF), require that the quaternion is a unit quaternion.