Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.Quaternion

Malware edited this page Dec 21, 2018 · 54 revisions

Index

Quaternion Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

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
float X Specifies the x-value of the vector component of the quaternion.
float Y Specifies the y-value of the vector component of the quaternion.
float Z Specifies the z-value of the vector component of the quaternion.
float W Specifies the rotation component of the quaternion.
static VRageMath.Quaternion Identity
static VRageMath.Quaternion Zero

Properties

Member Description
VRageMath.Vector3 Forward
VRageMath.Vector3 Right
VRageMath.Vector3 Up

Methods

Member Description
string ToString() Retireves a string representation of the current object.
string ToString(string)
string ToStringAxisAngle(string)
bool Equals(VRageMath.Quaternion) Determines whether the specified Object is equal to the Quaternion.
bool Equals(VRageMath.Quaternion, float)
bool Equals(System.Object) Returns a value that indicates whether the current instance is equal to a specified object.
int GetHashCode() Get the hash code of this object.
float LengthSquared() Calculates the length squared of a Quaternion.
float Length() Calculates the length of a Quaternion.
void Normalize() Divides each component of the quaternion by the length of the quaternion.
void GetAxisAngle(ref VRageMath.Vector3, ref float)
static VRageMath.Quaternion Normalize(VRageMath.Quaternion) Divides each component of the quaternion by the length of the quaternion.
static void Normalize(ref VRageMath.Quaternion, ref VRageMath.Quaternion) Divides each component of the quaternion by the length of the quaternion.
void Conjugate() Transforms this Quaternion into its conjugate.
static VRageMath.Quaternion Conjugate(VRageMath.Quaternion) Returns the conjugate of a specified Quaternion.
static void Conjugate(ref VRageMath.Quaternion, ref VRageMath.Quaternion) Returns the conjugate of a specified Quaternion.
static VRageMath.Quaternion Inverse(VRageMath.Quaternion) Returns the inverse of a Quaternion.
static void Inverse(ref VRageMath.Quaternion, ref VRageMath.Quaternion) Returns the inverse of a Quaternion.
static VRageMath.Quaternion CreateFromAxisAngle(VRageMath.Vector3, float) Creates a Quaternion from a vector and an angle to rotate about the vector.
static void CreateFromAxisAngle(ref VRageMath.Vector3, float, ref VRageMath.Quaternion) Creates a Quaternion from a vector and an angle to rotate about the vector.
static VRageMath.Quaternion CreateFromYawPitchRoll(float, float, float) Creates a new Quaternion from specified yaw, pitch, and roll angles.
static void CreateFromYawPitchRoll(float, float, float, ref VRageMath.Quaternion) Creates a new Quaternion from specified yaw, pitch, and roll angles.
static VRageMath.Quaternion CreateFromForwardUp(VRageMath.Vector3, VRageMath.Vector3) Works for normalized vectors only
static VRageMath.Quaternion CreateFromRotationMatrix(VRageMath.MatrixD)
static VRageMath.Quaternion CreateFromRotationMatrix(VRageMath.Matrix) Creates a Quaternion from a rotation Matrix.
static void CreateFromRotationMatrix(ref VRageMath.MatrixD, ref VRageMath.Quaternion)
static void CreateFromTwoVectors(ref VRageMath.Vector3, ref VRageMath.Vector3, ref VRageMath.Quaternion)
static VRageMath.Quaternion CreateFromTwoVectors(VRageMath.Vector3, VRageMath.Vector3)
static void CreateFromRotationMatrix(ref VRageMath.Matrix, ref VRageMath.Quaternion) Creates a Quaternion from a rotation Matrix.
static void CreateFromRotationMatrix(ref VRageMath.Matrix3x3, ref VRageMath.Quaternion) Creates a Quaternion from a rotation Matrix.
static float Dot(VRageMath.Quaternion, VRageMath.Quaternion) Calculates the dot product of two Quaternions.
static void Dot(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref float) Calculates the dot product of two Quaternions.
static VRageMath.Quaternion Slerp(VRageMath.Quaternion, VRageMath.Quaternion, float) Interpolates between two quaternions, using spherical linear interpolation.
static void Slerp(ref VRageMath.Quaternion, ref VRageMath.Quaternion, float, ref VRageMath.Quaternion) Interpolates between two quaternions, using spherical linear interpolation.
static VRageMath.Quaternion Lerp(VRageMath.Quaternion, VRageMath.Quaternion, float) Linearly interpolates between two quaternions.
static void Lerp(ref VRageMath.Quaternion, ref VRageMath.Quaternion, float, ref VRageMath.Quaternion) Linearly interpolates between two quaternions.
static VRageMath.Quaternion Concatenate(VRageMath.Quaternion, VRageMath.Quaternion) Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
static void Concatenate(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref VRageMath.Quaternion) Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
static VRageMath.Quaternion Negate(VRageMath.Quaternion) Flips the sign of each component of the quaternion.
static void Negate(ref VRageMath.Quaternion, ref VRageMath.Quaternion) Flips the sign of each component of the quaternion.
static VRageMath.Quaternion Add(VRageMath.Quaternion, VRageMath.Quaternion) Adds two Quaternions.
static void Add(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref VRageMath.Quaternion) Adds two Quaternions.
static VRageMath.Quaternion Subtract(VRageMath.Quaternion, VRageMath.Quaternion) Subtracts a quaternion from another quaternion.
static void Subtract(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref VRageMath.Quaternion) Subtracts a quaternion from another quaternion.
static VRageMath.Quaternion Multiply(VRageMath.Quaternion, VRageMath.Quaternion) Multiplies two quaternions.
static void Multiply(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref VRageMath.Quaternion) Multiplies two quaternions.
static VRageMath.Quaternion Multiply(VRageMath.Quaternion, float) Multiplies a quaternion by a scalar value.
static void Multiply(ref VRageMath.Quaternion, float, ref VRageMath.Quaternion) Multiplies a quaternion by a scalar value.
static VRageMath.Quaternion Divide(VRageMath.Quaternion, VRageMath.Quaternion) Divides a Quaternion by another Quaternion.
static void Divide(ref VRageMath.Quaternion, ref VRageMath.Quaternion, ref VRageMath.Quaternion) Divides a Quaternion by another Quaternion.
static VRageMath.Quaternion FromVector4(VRageMath.Vector4)
VRageMath.Vector4 ToVector4()
static bool IsZero(VRageMath.Quaternion)
static bool IsZero(VRageMath.Quaternion, float)
static void GetForward(ref VRageMath.Quaternion, ref VRageMath.Vector3) Gets forward vector (0,0,-1) transformed by quaternion.
static void GetRight(ref VRageMath.Quaternion, ref VRageMath.Vector3) Gets right vector (1,0,0) transformed by quaternion.
static void GetUp(ref VRageMath.Quaternion, ref VRageMath.Vector3) Gets up vector (0,1,0) transformed by quaternion.
float GetComponent(int)
void SetComponent(int, float)
int FindLargestIndex()

Clone this wiki locally