Space Engineers
|
Defines a four-dimensional vector (x,y,z,w), which is used to efficiently rotate an object about the (x, y, z) vector by the angle theta, where w = cos(theta/2). Uses double precision floating point numbers for calculation and storage More...
Public Member Functions | |
QuaternionD (double x, double y, double z, double w) | |
Initializes a new instance of QuaternionD. More... | |
QuaternionD (Vector3D vectorPart, double scalarPart) | |
Initializes a new instance of QuaternionD. More... | |
override string | ToString () |
Retireves a string representation of the current object. More... | |
bool | Equals (QuaternionD other) |
Determines whether the specified Object is equal to the QuaternionD. More... | |
override bool | Equals (object obj) |
Returns a value that indicates whether the current instance is equal to a specified object. More... | |
override int | GetHashCode () |
Get the hash code of this object. More... | |
double | LengthSquared () |
Calculates the length squared of a QuaternionD. More... | |
double | Length () |
Calculates the length of a QuaternionD. More... | |
void | Normalize () |
Divides each component of the quaternion by the length of the quaternion. More... | |
void | GetAxisAngle (out Vector3D axis, out double angle) |
void | Conjugate () |
Transforms this QuaternionD into its conjugate. More... | |
Vector4D | ToVector4 () |
Static Public Member Functions | |
static | QuaternionD () |
static QuaternionD | operator- (QuaternionD quaternion) |
Flips the sign of each component of the quaternion. More... | |
static bool | operator== (QuaternionD quaternion1, QuaternionD quaternion2) |
Compares two Quaternions for equality. More... | |
static bool | operator!= (QuaternionD quaternion1, QuaternionD quaternion2) |
Compare two Quaternions for inequality. More... | |
static QuaternionD | operator+ (QuaternionD quaternion1, QuaternionD quaternion2) |
Adds two Quaternions. More... | |
static QuaternionD | operator- (QuaternionD quaternion1, QuaternionD quaternion2) |
Subtracts a quaternion from another quaternion. More... | |
static QuaternionD | operator* (QuaternionD quaternion1, QuaternionD quaternion2) |
Multiplies two quaternions. More... | |
static QuaternionD | operator* (QuaternionD quaternion1, double scaleFactor) |
Multiplies a quaternion by a scalar value. More... | |
static QuaternionD | operator/ (QuaternionD quaternion1, QuaternionD quaternion2) |
Divides a QuaternionD by another QuaternionD. More... | |
static QuaternionD | Normalize (QuaternionD quaternion) |
Divides each component of the quaternion by the length of the quaternion. More... | |
static void | Normalize (ref QuaternionD quaternion, out QuaternionD result) |
Divides each component of the quaternion by the length of the quaternion. More... | |
static QuaternionD | Conjugate (QuaternionD value) |
Returns the conjugate of a specified QuaternionD. More... | |
static void | Conjugate (ref QuaternionD value, out QuaternionD result) |
Returns the conjugate of a specified QuaternionD. More... | |
static QuaternionD | Inverse (QuaternionD quaternion) |
Returns the inverse of a QuaternionD. More... | |
static void | Inverse (ref QuaternionD quaternion, out QuaternionD result) |
Returns the inverse of a QuaternionD. More... | |
static QuaternionD | CreateFromAxisAngle (Vector3D axis, double angle) |
Creates a QuaternionD from a vector and an angle to rotate about the vector. More... | |
static void | CreateFromAxisAngle (ref Vector3D axis, double angle, out QuaternionD result) |
Creates a QuaternionD from a vector and an angle to rotate about the vector. More... | |
static QuaternionD | CreateFromYawPitchRoll (double yaw, double pitch, double roll) |
Creates a new QuaternionD from specified yaw, pitch, and roll angles. More... | |
static void | CreateFromYawPitchRoll (double yaw, double pitch, double roll, out QuaternionD result) |
Creates a new QuaternionD from specified yaw, pitch, and roll angles. More... | |
static QuaternionD | CreateFromForwardUp (Vector3D forward, Vector3D up) |
Works for normalized vectors only More... | |
static QuaternionD | CreateFromRotationMatrix (MatrixD matrix) |
Creates a QuaternionD from a rotation MatrixD. More... | |
static void | CreateFromRotationMatrix (ref MatrixD matrix, out QuaternionD result) |
Creates a QuaternionD from a rotation MatrixD. More... | |
static double | Dot (QuaternionD quaternion1, QuaternionD quaternion2) |
Calculates the dot product of two Quaternions. More... | |
static void | Dot (ref QuaternionD quaternion1, ref QuaternionD quaternion2, out double result) |
Calculates the dot product of two Quaternions. More... | |
static QuaternionD | Slerp (QuaternionD quaternion1, QuaternionD quaternion2, double amount) |
Interpolates between two quaternions, using spherical linear interpolation. More... | |
static void | Slerp (ref QuaternionD quaternion1, ref QuaternionD quaternion2, double amount, out QuaternionD result) |
Interpolates between two quaternions, using spherical linear interpolation. More... | |
static QuaternionD | Lerp (QuaternionD quaternion1, QuaternionD quaternion2, double amount) |
Linearly interpolates between two quaternions. More... | |
static void | Lerp (ref QuaternionD quaternion1, ref QuaternionD quaternion2, double amount, out QuaternionD result) |
Linearly interpolates between two quaternions. More... | |
static QuaternionD | Concatenate (QuaternionD value1, QuaternionD value2) |
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation. More... | |
static void | Concatenate (ref QuaternionD value1, ref QuaternionD value2, out QuaternionD result) |
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation. More... | |
static QuaternionD | Negate (QuaternionD quaternion) |
Flips the sign of each component of the quaternion. More... | |
static void | Negate (ref QuaternionD quaternion, out QuaternionD result) |
Flips the sign of each component of the quaternion. More... | |
static QuaternionD | Add (QuaternionD quaternion1, QuaternionD quaternion2) |
Adds two Quaternions. More... | |
static void | Add (ref QuaternionD quaternion1, ref QuaternionD quaternion2, out QuaternionD result) |
Adds two Quaternions. More... | |
static QuaternionD | Subtract (QuaternionD quaternion1, QuaternionD quaternion2) |
Subtracts a quaternion from another quaternion. More... | |
static void | Subtract (ref QuaternionD quaternion1, ref QuaternionD quaternion2, out QuaternionD result) |
Subtracts a quaternion from another quaternion. More... | |
static QuaternionD | Multiply (QuaternionD quaternion1, QuaternionD quaternion2) |
Multiplies two quaternions. More... | |
static void | Multiply (ref QuaternionD quaternion1, ref QuaternionD quaternion2, out QuaternionD result) |
Multiplies two quaternions. More... | |
static QuaternionD | Multiply (QuaternionD quaternion1, double scaleFactor) |
Multiplies a quaternion by a scalar value. More... | |
static void | Multiply (ref QuaternionD quaternion1, double scaleFactor, out QuaternionD result) |
Multiplies a quaternion by a scalar value. More... | |
static QuaternionD | Divide (QuaternionD quaternion1, QuaternionD quaternion2) |
Divides a QuaternionD by another QuaternionD. More... | |
static void | Divide (ref QuaternionD quaternion1, ref QuaternionD quaternion2, out QuaternionD result) |
Divides a QuaternionD by another QuaternionD. More... | |
static QuaternionD | FromVector4 (Vector4D v) |
static bool | IsZero (QuaternionD value) |
static bool | IsZero (QuaternionD value, double epsilon) |
static void | CreateFromTwoVectors (ref Vector3D firstVector, ref Vector3D secondVector, out QuaternionD result) |
static QuaternionD | CreateFromTwoVectors (Vector3D firstVector, Vector3D secondVector) |
Public Attributes | |
double | X |
Specifies the x-value of the vector component of the quaternion. More... | |
double | Y |
Specifies the y-value of the vector component of the quaternion. More... | |
double | Z |
Specifies the z-value of the vector component of the quaternion. More... | |
double | W |
Specifies the rotation component of the quaternion. More... | |
Static Public Attributes | |
static QuaternionD | Identity = new QuaternionD(0.0, 0.0, 0.0, 1.0) |
Defines a four-dimensional vector (x,y,z,w), which is used to efficiently rotate an object about the (x, y, z) vector by the angle theta, where w = cos(theta/2). Uses double precision floating point numbers for calculation and storage
Definition at line 14 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 38 of file QuaternionD.cs.
|
inline |
Initializes a new instance of QuaternionD.
x | The x-value of the quaternion. |
y | The y-value of the quaternion. |
z | The z-value of the quaternion. |
w | The w-value of the quaternion. |
Definition at line 46 of file QuaternionD.cs.
|
inline |
Initializes a new instance of QuaternionD.
vectorPart | The vector component of the quaternion. |
scalarPart | The rotation component of the quaternion. |
Definition at line 58 of file QuaternionD.cs.
|
inlinestatic |
Adds two Quaternions.
quaternion1 | QuaternionD to add. |
quaternion2 | QuaternionD to add. |
Definition at line 831 of file QuaternionD.cs.
|
inlinestatic |
Adds two Quaternions.
quaternion1 | QuaternionD to add. |
quaternion2 | QuaternionD to add. |
result | [OutAttribute] Result of adding the Quaternions. |
Definition at line 845 of file QuaternionD.cs.
|
inlinestatic |
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
value1 | The first QuaternionD rotation in the series. |
value2 | The second QuaternionD rotation in the series. |
Definition at line 755 of file QuaternionD.cs.
|
inlinestatic |
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
value1 | The first QuaternionD rotation in the series. |
value2 | The second QuaternionD rotation in the series. |
result | [OutAttribute] The QuaternionD rotation representing the concatenation of value1 followed by value2. |
Definition at line 781 of file QuaternionD.cs.
|
inline |
Transforms this QuaternionD into its conjugate.
Definition at line 315 of file QuaternionD.cs.
|
inlinestatic |
Returns the conjugate of a specified QuaternionD.
value | The QuaternionD of which to return the conjugate. |
Definition at line 326 of file QuaternionD.cs.
|
inlinestatic |
Returns the conjugate of a specified QuaternionD.
value | The QuaternionD of which to return the conjugate. |
result | [OutAttribute] An existing QuaternionD filled in to be the conjugate of the specified one. |
Definition at line 340 of file QuaternionD.cs.
|
inlinestatic |
Creates a QuaternionD from a vector and an angle to rotate about the vector.
axis | The vector to rotate around. |
angle | The angle to rotate around the vector. |
Definition at line 380 of file QuaternionD.cs.
|
inlinestatic |
Creates a QuaternionD from a vector and an angle to rotate about the vector.
axis | The vector to rotate around. |
angle | The angle to rotate around the vector. |
result | [OutAttribute] The created QuaternionD. |
Definition at line 397 of file QuaternionD.cs.
|
inlinestatic |
Works for normalized vectors only
Definition at line 455 of file QuaternionD.cs.
|
inlinestatic |
Creates a QuaternionD from a rotation MatrixD.
matrix | The rotation MatrixD to create the QuaternionD from. |
Definition at line 515 of file QuaternionD.cs.
|
inlinestatic |
Creates a QuaternionD from a rotation MatrixD.
matrix | The rotation MatrixD to create the QuaternionD from. |
result | [OutAttribute] The created QuaternionD. |
Definition at line 562 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 1028 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 1037 of file QuaternionD.cs.
|
inlinestatic |
Creates a new QuaternionD from specified yaw, pitch, and roll angles.
yaw | The yaw angle, in radians, around the y-axis. |
pitch | The pitch angle, in radians, around the x-axis. |
roll | The roll angle, in radians, around the z-axis. |
Definition at line 412 of file QuaternionD.cs.
|
inlinestatic |
Creates a new QuaternionD from specified yaw, pitch, and roll angles.
yaw | The yaw angle, in radians, around the y-axis. |
pitch | The pitch angle, in radians, around the x-axis. |
roll | The roll angle, in radians, around the z-axis. |
result | [OutAttribute] An existing QuaternionD filled in to express the specified yaw, pitch, and roll angles. |
Definition at line 435 of file QuaternionD.cs.
|
inlinestatic |
Divides a QuaternionD by another QuaternionD.
quaternion1 | Source QuaternionD. |
quaternion2 | The divisor. |
Definition at line 959 of file QuaternionD.cs.
|
inlinestatic |
Divides a QuaternionD by another QuaternionD.
quaternion1 | Source QuaternionD. |
quaternion2 | The divisor. |
result | [OutAttribute] Result of the division. |
Definition at line 986 of file QuaternionD.cs.
|
inlinestatic |
Calculates the dot product of two Quaternions.
quaternion1 | Source QuaternionD. |
quaternion2 | Source QuaternionD. |
Definition at line 607 of file QuaternionD.cs.
|
inlinestatic |
Calculates the dot product of two Quaternions.
quaternion1 | Source QuaternionD. |
quaternion2 | Source QuaternionD. |
result | [OutAttribute] Dot product of the Quaternions. |
Definition at line 616 of file QuaternionD.cs.
|
inline |
Determines whether the specified Object is equal to the QuaternionD.
other | The QuaternionD to compare with the current QuaternionD. |
Definition at line 212 of file QuaternionD.cs.
|
inline |
Returns a value that indicates whether the current instance is equal to a specified object.
obj | Object to make the comparison with. |
Definition at line 224 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 1007 of file QuaternionD.cs.
|
inline |
Definition at line 268 of file QuaternionD.cs.
|
inline |
Get the hash code of this object.
Definition at line 235 of file QuaternionD.cs.
|
inlinestatic |
Returns the inverse of a QuaternionD.
quaternion | Source QuaternionD. |
Definition at line 352 of file QuaternionD.cs.
|
inlinestatic |
Returns the inverse of a QuaternionD.
quaternion | Source QuaternionD. |
result | [OutAttribute] The inverse of the QuaternionD. |
Definition at line 367 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 1017 of file QuaternionD.cs.
|
inlinestatic |
Definition at line 1023 of file QuaternionD.cs.
|
inline |
Calculates the length of a QuaternionD.
Definition at line 251 of file QuaternionD.cs.
|
inline |
Calculates the length squared of a QuaternionD.
Definition at line 243 of file QuaternionD.cs.
|
inlinestatic |
Linearly interpolates between two quaternions.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
amount | Value indicating how far to interpolate between the quaternions. |
Definition at line 695 of file QuaternionD.cs.
|
inlinestatic |
Linearly interpolates between two quaternions.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
amount | Value indicating how far to interpolate between the quaternions. |
result | [OutAttribute] The resulting quaternion. |
Definition at line 726 of file QuaternionD.cs.
|
inlinestatic |
Multiplies two quaternions.
quaternion1 | The quaternion on the left of the multiplication. |
quaternion2 | The quaternion on the right of the multiplication. |
Definition at line 883 of file QuaternionD.cs.
|
inlinestatic |
Multiplies two quaternions.
quaternion1 | The quaternion on the left of the multiplication. |
quaternion2 | The quaternion on the right of the multiplication. |
result | [OutAttribute] The result of the multiplication. |
Definition at line 909 of file QuaternionD.cs.
|
inlinestatic |
Multiplies a quaternion by a scalar value.
quaternion1 | Source quaternion. |
scaleFactor | Scalar value. |
Definition at line 933 of file QuaternionD.cs.
|
inlinestatic |
Multiplies a quaternion by a scalar value.
quaternion1 | Source quaternion. |
scaleFactor | Scalar value. |
result | [OutAttribute] The result of the multiplication. |
Definition at line 947 of file QuaternionD.cs.
|
inlinestatic |
Flips the sign of each component of the quaternion.
quaternion | Source quaternion. |
Definition at line 805 of file QuaternionD.cs.
|
inlinestatic |
Flips the sign of each component of the quaternion.
quaternion | Source quaternion. |
result | [OutAttribute] Negated quaternion. |
Definition at line 819 of file QuaternionD.cs.
|
inline |
Divides each component of the quaternion by the length of the quaternion.
Definition at line 259 of file QuaternionD.cs.
|
inlinestatic |
Divides each component of the quaternion by the length of the quaternion.
quaternion | Source quaternion. |
Definition at line 288 of file QuaternionD.cs.
|
inlinestatic |
Divides each component of the quaternion by the length of the quaternion.
quaternion | Source quaternion. |
result | [OutAttribute] Normalized quaternion. |
Definition at line 303 of file QuaternionD.cs.
|
inlinestatic |
Compare two Quaternions for inequality.
quaternion1 | Source QuaternionD. |
quaternion2 | Source QuaternionD. |
Definition at line 96 of file QuaternionD.cs.
|
inlinestatic |
Multiplies two quaternions.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
Definition at line 136 of file QuaternionD.cs.
|
inlinestatic |
Multiplies a quaternion by a scalar value.
quaternion1 | Source quaternion. |
scaleFactor | Scalar value. |
Definition at line 162 of file QuaternionD.cs.
|
inlinestatic |
Adds two Quaternions.
quaternion1 | QuaternionD to add. |
quaternion2 | QuaternionD to add. |
Definition at line 108 of file QuaternionD.cs.
|
inlinestatic |
Flips the sign of each component of the quaternion.
quaternion | Source quaternion. |
Definition at line 70 of file QuaternionD.cs.
|
inlinestatic |
Subtracts a quaternion from another quaternion.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
Definition at line 122 of file QuaternionD.cs.
|
inlinestatic |
Divides a QuaternionD by another QuaternionD.
quaternion1 | Source QuaternionD. |
quaternion2 | The divisor. |
Definition at line 176 of file QuaternionD.cs.
|
inlinestatic |
Compares two Quaternions for equality.
quaternion1 | Source QuaternionD. |
quaternion2 | Source QuaternionD. |
Definition at line 84 of file QuaternionD.cs.
|
inlinestatic |
Interpolates between two quaternions, using spherical linear interpolation.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
amount | Value that indicates how far to interpolate between the quaternions. |
Definition at line 625 of file QuaternionD.cs.
|
inlinestatic |
Interpolates between two quaternions, using spherical linear interpolation.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
amount | Value that indicates how far to interpolate between the quaternions. |
result | [OutAttribute] Result of the interpolation. |
Definition at line 661 of file QuaternionD.cs.
|
inlinestatic |
Subtracts a quaternion from another quaternion.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
Definition at line 857 of file QuaternionD.cs.
|
inlinestatic |
Subtracts a quaternion from another quaternion.
quaternion1 | Source quaternion. |
quaternion2 | Source quaternion. |
result | [OutAttribute] Result of the subtraction. |
Definition at line 871 of file QuaternionD.cs.
|
inline |
Retireves a string representation of the current object.
Definition at line 202 of file QuaternionD.cs.
|
inline |
Definition at line 1012 of file QuaternionD.cs.
|
static |
Definition at line 16 of file QuaternionD.cs.
double VRageMath.QuaternionD.W |
Specifies the rotation component of the quaternion.
Definition at line 36 of file QuaternionD.cs.
double VRageMath.QuaternionD.X |
Specifies the x-value of the vector component of the quaternion.
Definition at line 21 of file QuaternionD.cs.
double VRageMath.QuaternionD.Y |
Specifies the y-value of the vector component of the quaternion.
Definition at line 26 of file QuaternionD.cs.
double VRageMath.QuaternionD.Z |
Specifies the z-value of the vector component of the quaternion.
Definition at line 31 of file QuaternionD.cs.