-
Notifications
You must be signed in to change notification settings - Fork 123
VRageMath.Quaternion
← Index ← Namespace Index
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).
Namespace: VRageMath
Assembly: VRage.Math.dll
Implements:
Specifies the rotation component of the quaternion.
Specifies the x-value of the vector component of the quaternion.
Specifies the y-value of the vector component of the quaternion.
Specifies the z-value of the vector component of the quaternion.
Quaternion(float x, float y, float z, float w)
Quaternion(Vector3 vectorPart, float scalarPart)
static Quaternion Add(Quaternion quaternion1, Quaternion quaternion2)
Adds two Quaternions.
static void Add(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
Adds two Quaternions.
static Quaternion Concatenate(Quaternion value1, Quaternion value2)
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
static void Concatenate(ref Quaternion value1, ref Quaternion value2, out Quaternion result)
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
static Quaternion Conjugate(Quaternion value)
Returns the conjugate of a specified Quaternion.
static void Conjugate(ref Quaternion value, out Quaternion result)
Returns the conjugate of a specified Quaternion.
static Quaternion CreateFromAxisAngle(Vector3 axis, float angle)
Creates a Quaternion from a vector and an angle to rotate about the vector.
static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Quaternion result)
Creates a Quaternion from a vector and an angle to rotate about the vector.
static Quaternion CreateFromForwardUp(Vector3 forward, Vector3 up)
Works for normalized vectors only
static Quaternion CreateFromRotationMatrix(ref MatrixD matrix)
static Quaternion CreateFromRotationMatrix(Matrix matrix)
Creates a Quaternion from a rotation Matrix.
static void CreateFromRotationMatrix(ref MatrixD matrix, out Quaternion result)
static void CreateFromRotationMatrix(ref Matrix matrix, out Quaternion result)
Creates a Quaternion from a rotation Matrix.
static void CreateFromRotationMatrix(ref Matrix3x3 matrix, out Quaternion result)
Creates a Quaternion from a rotation Matrix.
static Quaternion CreateFromTwoVectors(Vector3 firstVector, Vector3 secondVector)
static Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll)
Creates a new Quaternion from specified yaw, pitch, and roll angles.
static void CreateFromYawPitchRoll(float yaw, float pitch, float roll, out Quaternion result)
Creates a new Quaternion from specified yaw, pitch, and roll angles.
static Quaternion Divide(Quaternion quaternion1, Quaternion quaternion2)
Divides a Quaternion by another Quaternion.
static void Divide(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
Divides a Quaternion by another Quaternion.
static float Dot(Quaternion quaternion1, Quaternion quaternion2)
Calculates the dot product of two Quaternions.
static void Dot(ref Quaternion quaternion1, ref Quaternion quaternion2, out float result)
Calculates the dot product of two Quaternions.
static Quaternion FromVector4(Vector4 v)
static void GetForward(ref Quaternion q, out Vector3 result)
Gets forward vector (0,0,-1) transformed by quaternion.
static void GetRight(ref Quaternion q, out Vector3 result)
Gets right vector (1,0,0) transformed by quaternion.
static void GetUp(ref Quaternion q, out Vector3 result)
Gets up vector (0,1,0) transformed by quaternion.
static Quaternion Inverse(Quaternion quaternion)
Returns the inverse of a Quaternion.
static void Inverse(ref Quaternion quaternion, out Quaternion result)
Returns the inverse of a Quaternion.
static bool IsZero(Quaternion value)
static bool IsZero(Quaternion value, float epsilon)
static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
Linearly interpolates between two quaternions.
Linearly interpolates between two quaternions.
static Quaternion Multiply(Quaternion quaternion1, Quaternion quaternion2)
Multiplies two quaternions.
static void Multiply(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
Multiplies two quaternions.
static Quaternion Multiply(Quaternion quaternion1, float scaleFactor)
Multiplies a quaternion by a scalar value.
static void Multiply(ref Quaternion quaternion1, float scaleFactor, out Quaternion result)
Multiplies a quaternion by a scalar value.
static Quaternion Negate(Quaternion quaternion)
Flips the sign of each component of the quaternion.
static void Negate(ref Quaternion quaternion, out Quaternion result)
Flips the sign of each component of the quaternion.
static Quaternion Normalize(Quaternion quaternion)
Divides each component of the quaternion by the length of the quaternion.
static void Normalize(ref Quaternion quaternion, out Quaternion result)
Divides each component of the quaternion by the length of the quaternion.
static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
Interpolates between two quaternions, using spherical linear interpolation.
Interpolates between two quaternions, using spherical linear interpolation.
static Quaternion Subtract(Quaternion quaternion1, Quaternion quaternion2)
Subtracts a quaternion from another quaternion.
static void Subtract(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
Subtracts a quaternion from another quaternion.
Transforms this Quaternion into its conjugate.
Determines whether the specified Object is equal to the Quaternion.
bool Equals(Quaternion value, float epsilon)
Returns a value that indicates whether the current instance is equal to a specified object.
void GetAxisAngle(out Vector3 axis, out float angle)
Get the hash code of this object.
Calculates the length of a Quaternion.
Calculates the length squared of a Quaternion.
Divides each component of the quaternion by the length of the quaternion.
void SetComponent(int index, float value)
Retireves a string representation of the current object.
string ToString(string format)
string ToStringAxisAngle(string format = "G")
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!