UnitQuaternion Constructor (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.
Namespace:
AGI.Foundation.Coordinates
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 25.2.423.0 (25.2.423.0)
Syntaxpublic UnitQuaternion(
double[] elements,
int startIndex
)
Public Sub New (
elements As Double(),
startIndex As Integer
)
public:
UnitQuaternion(
array<double>^ elements,
int startIndex
)
new :
elements : float[] *
startIndex : int -> UnitQuaternionParameters
- elements
- Type: SystemDouble
The array of coordinate values. - startIndex
- Type: SystemInt32
The index of the first element in the array to use.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException |
Thrown when elements is .
|
| ArgumentOutOfRangeException |
Thrown when an object of this type is constructed from an array with less than 4 elements.
|
Remarks
For performance reasons, no checks or normalization procedures are performed when creating a
UnitQuaternion from
the given
elements. The surrounding code is responsible for making sure that the given values
represent a unit magnitude. To ensure proper normalization, create a
Quaternion and then use the
Normalize method to create a valid
UnitQuaternion.
See Also