VRageMath
Quaternion
Assembly: VRage.Math.dll
public struct Quaternion: IEquatable<Quaternion>
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).
Fields
| Member | Description |
|---|---|
| static Identity | |
| static Zero | |
| W | Specifies the rotation component of the quaternion. |
| X | Specifies the x-value of the vector component of the quaternion. |
| Y | Specifies the y-value of the vector component of the quaternion. |
| Z | Specifies the z-value of the vector component of the quaternion. |
Properties
| Member | Description |
|---|---|
| Forward | |
| Right | |
| Up |
Constructors
| Member | Description |
|---|---|
| Quaternion(float, float, float, float) | |
| Quaternion(Vector3, float) |
Methods
| Member | Description |
|---|---|
| static Add(Quaternion, Quaternion) | Adds two Quaternions. |
| static Add(ref Quaternion, ref Quaternion, out Quaternion) | Adds two Quaternions. |
| static Concatenate(Quaternion, Quaternion) | Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation. |
| static Concatenate(ref Quaternion, ref Quaternion, out Quaternion) | Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation. |
| static Conjugate(Quaternion) | Returns the conjugate of a specified Quaternion. |
| static Conjugate(ref Quaternion, out Quaternion) | Returns the conjugate of a specified Quaternion. |
| static CreateFromAxisAngle(Vector3, float) | Creates a Quaternion from a vector and an angle to rotate about the vector. |
| static CreateFromAxisAngle(ref Vector3, float, out Quaternion) | Creates a Quaternion from a vector and an angle to rotate about the vector. |
| static CreateFromForwardUp(Vector3, Vector3) | Works for normalized vectors only |
| static CreateFromRotationMatrix(ref MatrixD) | |
| static CreateFromRotationMatrix(Matrix) | Creates a Quaternion from a rotation Matrix. |
| static CreateFromRotationMatrix(ref MatrixD, out Quaternion) | |
| static CreateFromRotationMatrix(ref Matrix, out Quaternion) | Creates a Quaternion from a rotation Matrix. |
| static CreateFromRotationMatrix(ref Matrix3x3, out Quaternion) | Creates a Quaternion from a rotation Matrix. |
| static CreateFromTwoVectors(ref Vector3, ref Vector3, out Quaternion) | |
| static CreateFromTwoVectors(Vector3, Vector3) | |
| static CreateFromYawPitchRoll(float, float, float) | Creates a new Quaternion from specified yaw, pitch, and roll angles. |
| static CreateFromYawPitchRoll(float, float, float, out Quaternion) | Creates a new Quaternion from specified yaw, pitch, and roll angles. |
| static Divide(Quaternion, Quaternion) | Divides a Quaternion by another Quaternion. |
| static Divide(ref Quaternion, ref Quaternion, out Quaternion) | Divides a Quaternion by another Quaternion. |
| static Dot(Quaternion, Quaternion) | Calculates the dot product of two Quaternions. |
| static Dot(ref Quaternion, ref Quaternion, out float) | Calculates the dot product of two Quaternions. |
| static FromVector4(Vector4) | |
| static GetForward(ref Quaternion, out Vector3) | Gets forward vector (0,0,-1) transformed by quaternion. |
| static GetRight(ref Quaternion, out Vector3) | Gets right vector (1,0,0) transformed by quaternion. |
| static GetUp(ref Quaternion, out Vector3) | Gets up vector (0,1,0) transformed by quaternion. |
| static Inverse(Quaternion) | Returns the inverse of a Quaternion. |
| static Inverse(ref Quaternion, out Quaternion) | Returns the inverse of a Quaternion. |
| static IsZero(Quaternion) | |
| static IsZero(Quaternion, float) | |
| static Lerp(Quaternion, Quaternion, float) | Linearly interpolates between two quaternions. |
| static Lerp(ref Quaternion, ref Quaternion, float, out Quaternion) | Linearly interpolates between two quaternions. |
| static Multiply(Quaternion, Quaternion) | Multiplies two quaternions. |
| static Multiply(ref Quaternion, ref Quaternion, out Quaternion) | Multiplies two quaternions. |
| static Multiply(Quaternion, float) | Multiplies a quaternion by a scalar value. |
| static Multiply(ref Quaternion, float, out Quaternion) | Multiplies a quaternion by a scalar value. |
| static Negate(Quaternion) | Flips the sign of each component of the quaternion. |
| static Negate(ref Quaternion, out Quaternion) | Flips the sign of each component of the quaternion. |
| static Normalize(Quaternion) | Divides each component of the quaternion by the length of the quaternion. |
| static Normalize(ref Quaternion, out Quaternion) | Divides each component of the quaternion by the length of the quaternion. |
| static Slerp(Quaternion, Quaternion, float) | Interpolates between two quaternions, using spherical linear interpolation. |
| static Slerp(ref Quaternion, ref Quaternion, float, out Quaternion) | Interpolates between two quaternions, using spherical linear interpolation. |
| static Subtract(Quaternion, Quaternion) | Subtracts a quaternion from another quaternion. |
| static Subtract(ref Quaternion, ref Quaternion, out Quaternion) | Subtracts a quaternion from another quaternion. |
| Conjugate() | Transforms this Quaternion into its conjugate. |
| Equals(Quaternion) | Determines whether the specified Object is equal to the Quaternion. |
| Equals(Quaternion, float) | |
| Equals(object) | Returns a value that indicates whether the current instance is equal to a specified object. |
| FindLargestIndex() | |
| GetAxisAngle(out Vector3, out float) | |
| GetComponent(int) | |
| GetHashCode() | Get the hash code of this object. |
| Length() | Calculates the length of a Quaternion. |
| LengthSquared() | Calculates the length squared of a Quaternion. |
| Normalize() | Divides each component of the quaternion by the length of the quaternion. |
| SetComponent(int, float) | |
| ToString() | Retireves a string representation of the current object. |
| ToString(string) | |
| ToStringAxisAngle(string) | |
| ToVector4() |
Implements: