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
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.
W Specifies the rotation component of the quaternion.
static Identity
static Zero

Properties

Member Description
Forward
Right
Up

Methods

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

Clone this wiki locally