UnitQuaternion Structure |
Namespace: AGI.Foundation.Coordinates
The UnitQuaternion type exposes the following members.
Name | Description | |
---|---|---|
UnitQuaternion(AngleAxisRotation) |
Initializes a set of UnitQuaternion coordinates from the provided AngleAxisRotation.
| |
UnitQuaternion(Double) |
Initializes a set of UnitQuaternion coordinates from the first 4 consecutive elements in the provided array.
Note that the elements will not be normalized and may represent an invalid unit quaternion.
| |
UnitQuaternion(ElementaryRotation) |
Initializes a set of UnitQuaternion coordinates from the provided ElementaryRotation.
| |
UnitQuaternion(EulerSequence) |
Initializes a set of UnitQuaternion coordinates from the provided EulerSequence.
| |
UnitQuaternion(Matrix3By3) |
Initializes a set of UnitQuaternion coordinates from the provided rotation matrix (Matrix3By3).
Note that if the given matrix is not an orthogonal rotation matrix,
it will create a non-unit UnitQuaternion and could cause problems in code which assumes that the UnitQuaternion represents a rotation.
| |
UnitQuaternion(Quaternion) |
Initializes a set of UnitQuaternion coordinates from the provided set of Quaternion coordinates.
| |
UnitQuaternion(YawPitchRoll) |
Initializes a set of UnitQuaternion coordinates from the provided YawPitchRoll.
| |
UnitQuaternion(Double, Int32) |
Initializes a set of UnitQuaternion coordinates from 4 consecutive elements in the provided array.
Note that the elements will not be normalized and may represent an invalid unit quaternion.
| |
UnitQuaternion(Double, Double, Double, Double) |
Initializes a set of UnitQuaternion coordinates from the provided values.
| |
UnitQuaternion(Double, Double, Double, Double, Double) |
Initializes a set of UnitQuaternion coordinates from the provided values.
|
Name | Description | |
---|---|---|
Identity |
Gets a set of UnitQuaternion coordinates representing the identity vector.
| |
IsUndefined |
Gets a value indicating whether or not any of the coordinates for this instance have the value NaN.
| |
Item | ||
Length |
Gets the number of elements in this set of coordinates.
| |
Undefined |
Gets a set of UnitQuaternion coordinates with values of NaN.
| |
W |
Gets the W coordinate.
| |
X |
Gets the X coordinate.
| |
Y |
Gets the Y coordinate.
| |
Z |
Gets the Z coordinate.
|
Name | Description | |
---|---|---|
Conjugate |
Forms the conjugate of this instance.
| |
Equals(Object) |
Indicates whether another object is exactly equal to this instance.
(Overrides ValueTypeEquals(Object).) | |
Equals(UnitQuaternion) |
Indicates whether another instance of this type is exactly equal to this instance.
| |
EqualsEpsilon |
Indicates whether each coordinate value of another instance of this type
is within the required tolerance of the corresponding coordinate value of this instance.
| |
GetHashCode |
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsEquivalent(UnitQuaternion) |
Indicates whether another instance of this type is mathematically equivalent to this instance.
Instances are equivalent if each coordinate value of one instance is equal to the corresponding coordinate value of the other instance,
or if each coordinate value of one instance is the opposite of the corresponding coordinate value of the other instance.
| |
IsEquivalent(UnitQuaternion, Double) |
Indicates whether another instance of this type is mathematically equivalent to this instance, within the required tolerance.
Instances are equivalent if each coordinate value of one instance is equal to the corresponding coordinate value of the other instance,
or if each coordinate value of one instance is the opposite of the corresponding coordinate value of the other instance.
| |
Multiply(Double) |
Multiplies this instance by a scalar.
| |
Multiply(ElementaryRotation) |
Multiplies this instance by the specified ElementaryRotation, yielding a new UnitQuaternion.
| |
Multiply(UnitQuaternion) |
Multiplies this instance by the specified UnitQuaternion, yielding a new UnitQuaternion.
| |
ToString |
Returns the string representation of the value of this instance.
(Overrides ValueTypeToString.) |
Name | Description | |
---|---|---|
Equality |
Returns if the two instances are exactly equal.
| |
Inequality |
Returns if the two instances are not exactly equal.
| |
Multiply(Double, UnitQuaternion) |
Multiplies a scalar by a specified UnitQuaternion, yielding a new Quaternion.
| |
Multiply(UnitQuaternion, ElementaryRotation) |
Multiplies a specified UnitQuaternion by a specified ElementaryRotation, yielding a new UnitQuaternion.
| |
Multiply(UnitQuaternion, UnitQuaternion) |
Multiplies a specified UnitQuaternion by another specified UnitQuaternion, yielding a new UnitQuaternion.
| |
Multiply(UnitQuaternion, Double) |
Multiplies a specified UnitQuaternion by a scalar, yielding a new Quaternion.
| |
UnaryNegation |
Negates the specified UnitQuaternion, yielding a new UnitQuaternion.
|
For more information on how quaternions and other coordinates are used to represent rotations, see the Coordinates topic.
The normalization of the quaternion is accomplished in the usual way. It should be noted that this does not guarantee a result whose magnitude will be 1.0 in cases where an individual component underflows upon squaring.