Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
VRageMath.Quaternion Struct Reference

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). More...

Inheritance diagram for VRageMath.Quaternion:

Public Member Functions

 Quaternion (float x, float y, float z, float w)
 Initializes a new instance of Quaternion. More...
 
 Quaternion (Vector3 vectorPart, float scalarPart)
 Initializes a new instance of Quaternion. More...
 
override string ToString ()
 Retireves a string representation of the current object. More...
 
string ToStringAxisAngle (string format="G")
 
bool Equals (Quaternion other)
 Determines whether the specified Object is equal to the Quaternion. More...
 
bool Equals (Quaternion value, float epsilon)
 
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...
 
float LengthSquared ()
 Calculates the length squared of a Quaternion. More...
 
float Length ()
 Calculates the length of a Quaternion. More...
 
void Normalize ()
 Divides each component of the quaternion by the length of the quaternion. More...
 
void GetAxisAngle (out Vector3 axis, out float angle)
 
void Conjugate ()
 Transforms this Quaternion into its conjugate. More...
 
Vector4 ToVector4 ()
 
float GetComponent (int index)
 
void SetComponent (int index, float value)
 
int FindLargestIndex ()
 

Static Public Member Functions

static Quaternion ()
 
static Quaternion operator- (Quaternion quaternion)
 Flips the sign of each component of the quaternion. More...
 
static bool operator== (Quaternion quaternion1, Quaternion quaternion2)
 Compares two Quaternions for equality. More...
 
static bool operator!= (Quaternion quaternion1, Quaternion quaternion2)
 Compare two Quaternions for inequality. More...
 
static Quaternion operator+ (Quaternion quaternion1, Quaternion quaternion2)
 Adds two Quaternions. More...
 
static Quaternion operator- (Quaternion quaternion1, Quaternion quaternion2)
 Subtracts a quaternion from another quaternion. More...
 
static Quaternion operator* (Quaternion quaternion1, Quaternion quaternion2)
 Multiplies two quaternions. More...
 
static Quaternion operator* (Quaternion quaternion1, float scaleFactor)
 Multiplies a quaternion by a scalar value. More...
 
static Quaternion operator/ (Quaternion quaternion1, Quaternion quaternion2)
 Divides a Quaternion by another Quaternion. More...
 
static Quaternion Normalize (Quaternion quaternion)
 Divides each component of the quaternion by the length of the quaternion. More...
 
static void Normalize (ref Quaternion quaternion, out Quaternion result)
 Divides each component of the quaternion by the length of the quaternion. More...
 
static Quaternion Conjugate (Quaternion value)
 Returns the conjugate of a specified Quaternion. More...
 
static void Conjugate (ref Quaternion value, out Quaternion result)
 Returns the conjugate of a specified Quaternion. More...
 
static Quaternion Inverse (Quaternion quaternion)
 Returns the inverse of a Quaternion. More...
 
static void Inverse (ref Quaternion quaternion, out Quaternion result)
 Returns the inverse of a Quaternion. More...
 
static Quaternion CreateFromAxisAngle (Vector3 axis, float angle)
 Creates a Quaternion from a vector and an angle to rotate about the vector. More...
 
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. More...
 
static Quaternion CreateFromYawPitchRoll (float yaw, float pitch, float roll)
 Creates a new Quaternion from specified yaw, pitch, and roll angles. More...
 
static void CreateFromYawPitchRoll (float yaw, float pitch, float roll, out Quaternion result)
 Creates a new Quaternion from specified yaw, pitch, and roll angles. More...
 
static Quaternion CreateFromForwardUp (Vector3 forward, Vector3 up)
 Works for normalized vectors only More...
 
static Quaternion CreateFromRotationMatrix (MatrixD matrix)
 
static Quaternion CreateFromRotationMatrix (Matrix matrix)
 Creates a Quaternion from a rotation Matrix. More...
 
static void CreateFromRotationMatrix (ref MatrixD matrix, out Quaternion result)
 
static void CreateFromTwoVectors (ref Vector3 firstVector, ref Vector3 secondVector, out Quaternion result)
 
static Quaternion CreateFromTwoVectors (Vector3 firstVector, Vector3 secondVector)
 
static void CreateFromRotationMatrix (ref Matrix matrix, out Quaternion result)
 Creates a Quaternion from a rotation Matrix. More...
 
static float Dot (Quaternion quaternion1, Quaternion quaternion2)
 Calculates the dot product of two Quaternions. More...
 
static void Dot (ref Quaternion quaternion1, ref Quaternion quaternion2, out float result)
 Calculates the dot product of two Quaternions. More...
 
static Quaternion Slerp (Quaternion quaternion1, Quaternion quaternion2, float amount)
 Interpolates between two quaternions, using spherical linear interpolation. More...
 
static void Slerp (ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result)
 Interpolates between two quaternions, using spherical linear interpolation. More...
 
static Quaternion Lerp (Quaternion quaternion1, Quaternion quaternion2, float amount)
 Linearly interpolates between two quaternions. More...
 
static void Lerp (ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result)
 Linearly interpolates between two quaternions. More...
 
static Quaternion Concatenate (Quaternion value1, Quaternion value2)
 Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation. More...
 
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. More...
 
static Quaternion Negate (Quaternion quaternion)
 Flips the sign of each component of the quaternion. More...
 
static void Negate (ref Quaternion quaternion, out Quaternion result)
 Flips the sign of each component of the quaternion. More...
 
static Quaternion Add (Quaternion quaternion1, Quaternion quaternion2)
 Adds two Quaternions. More...
 
static void Add (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
 Adds two Quaternions. More...
 
static Quaternion Subtract (Quaternion quaternion1, Quaternion quaternion2)
 Subtracts a quaternion from another quaternion. More...
 
static void Subtract (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
 Subtracts a quaternion from another quaternion. More...
 
static Quaternion Multiply (Quaternion quaternion1, Quaternion quaternion2)
 Multiplies two quaternions. More...
 
static void Multiply (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
 Multiplies two quaternions. More...
 
static Quaternion Multiply (Quaternion quaternion1, float scaleFactor)
 Multiplies a quaternion by a scalar value. More...
 
static void Multiply (ref Quaternion quaternion1, float scaleFactor, out Quaternion result)
 Multiplies a quaternion by a scalar value. More...
 
static Quaternion Divide (Quaternion quaternion1, Quaternion quaternion2)
 Divides a Quaternion by another Quaternion. More...
 
static void Divide (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
 Divides a Quaternion by another Quaternion. More...
 
static Quaternion FromVector4 (Vector4 v)
 
static bool IsZero (Quaternion value)
 
static bool IsZero (Quaternion value, float epsilon)
 
static void GetForward (ref Quaternion q, out Vector3 result)
 Gets forward vector (0,0,-1) transformed by quaternion. More...
 
static void GetRight (ref Quaternion q, out Vector3 result)
 Gets right vector (1,0,0) transformed by quaternion. More...
 
static void GetUp (ref Quaternion q, out Vector3 result)
 Gets up vector (0,1,0) transformed by quaternion. More...
 

Public Attributes

float X
 Specifies the x-value of the vector component of the quaternion. More...
 
float Y
 Specifies the y-value of the vector component of the quaternion. More...
 
float Z
 Specifies the z-value of the vector component of the quaternion. More...
 
float W
 Specifies the rotation component of the quaternion. More...
 

Static Public Attributes

static Quaternion Identity = new Quaternion(0.0f, 0.0f, 0.0f, 1f)
 
static Quaternion Zero = new Quaternion(0.0f, 0.0f, 0.0f, 0.0f)
 

Properties

Vector3 Forward [get]
 
Vector3 Right [get]
 
Vector3 Up [get]
 

Detailed Description

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).

Definition at line 11 of file Quaternion.cs.

Constructor & Destructor Documentation

static VRageMath.Quaternion.Quaternion ( )
inlinestatic

Definition at line 66 of file Quaternion.cs.

VRageMath.Quaternion.Quaternion ( float  x,
float  y,
float  z,
float  w 
)
inline

Initializes a new instance of Quaternion.

Parameters
xThe x-value of the quaternion.
yThe y-value of the quaternion.
zThe z-value of the quaternion.
wThe w-value of the quaternion.

Definition at line 74 of file Quaternion.cs.

VRageMath.Quaternion.Quaternion ( Vector3  vectorPart,
float  scalarPart 
)
inline

Initializes a new instance of Quaternion.

Parameters
vectorPartThe vector component of the quaternion.
scalarPartThe rotation component of the quaternion.

Definition at line 86 of file Quaternion.cs.

Member Function Documentation

static Quaternion VRageMath.Quaternion.Add ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Adds two Quaternions.

Parameters
quaternion1Quaternion to add.
quaternion2Quaternion to add.

Definition at line 898 of file Quaternion.cs.

static void VRageMath.Quaternion.Add ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
out Quaternion  result 
)
inlinestatic

Adds two Quaternions.

Parameters
quaternion1Quaternion to add.
quaternion2Quaternion to add.
result[OutAttribute] Result of adding the Quaternions.

Definition at line 912 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Concatenate ( Quaternion  value1,
Quaternion  value2 
)
inlinestatic

Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.

Parameters
value1The first Quaternion rotation in the series.
value2The second Quaternion rotation in the series.

Definition at line 822 of file Quaternion.cs.

static void VRageMath.Quaternion.Concatenate ( ref Quaternion  value1,
ref Quaternion  value2,
out Quaternion  result 
)
inlinestatic

Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.

Parameters
value1The first Quaternion rotation in the series.
value2The second Quaternion rotation in the series.
result[OutAttribute] The Quaternion rotation representing the concatenation of value1 followed by value2.

Definition at line 848 of file Quaternion.cs.

void VRageMath.Quaternion.Conjugate ( )
inline

Transforms this Quaternion into its conjugate.

Definition at line 356 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Conjugate ( Quaternion  value)
inlinestatic

Returns the conjugate of a specified Quaternion.

Parameters
valueThe Quaternion of which to return the conjugate.

Definition at line 367 of file Quaternion.cs.

static void VRageMath.Quaternion.Conjugate ( ref Quaternion  value,
out Quaternion  result 
)
inlinestatic

Returns the conjugate of a specified Quaternion.

Parameters
valueThe Quaternion of which to return the conjugate.
result[OutAttribute] An existing Quaternion filled in to be the conjugate of the specified one.

Definition at line 381 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromAxisAngle ( Vector3  axis,
float  angle 
)
inlinestatic

Creates a Quaternion from a vector and an angle to rotate about the vector.

Parameters
axisThe vector to rotate around.
angleThe angle to rotate around the vector.

Definition at line 421 of file Quaternion.cs.

static void VRageMath.Quaternion.CreateFromAxisAngle ( ref Vector3  axis,
float  angle,
out Quaternion  result 
)
inlinestatic

Creates a Quaternion from a vector and an angle to rotate about the vector.

Parameters
axisThe vector to rotate around.
angleThe angle to rotate around the vector.
result[OutAttribute] The created Quaternion.

Definition at line 438 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromForwardUp ( Vector3  forward,
Vector3  up 
)
inlinestatic

Works for normalized vectors only

Definition at line 496 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromRotationMatrix ( MatrixD  matrix)
inlinestatic

Definition at line 552 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromRotationMatrix ( Matrix  matrix)
inlinestatic

Creates a Quaternion from a rotation Matrix.

Parameters
matrixThe rotation Matrix to create the Quaternion from.

Definition at line 560 of file Quaternion.cs.

static void VRageMath.Quaternion.CreateFromRotationMatrix ( ref MatrixD  matrix,
out Quaternion  result 
)
inlinestatic

Definition at line 603 of file Quaternion.cs.

static void VRageMath.Quaternion.CreateFromRotationMatrix ( ref Matrix  matrix,
out Quaternion  result 
)
inlinestatic

Creates a Quaternion from a rotation Matrix.

Parameters
matrixThe rotation Matrix to create the Quaternion from.
result[OutAttribute] The created Quaternion.

Definition at line 629 of file Quaternion.cs.

static void VRageMath.Quaternion.CreateFromTwoVectors ( ref Vector3  firstVector,
ref Vector3  secondVector,
out Quaternion  result 
)
inlinestatic

Definition at line 609 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromTwoVectors ( Vector3  firstVector,
Vector3  secondVector 
)
inlinestatic

Definition at line 618 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.CreateFromYawPitchRoll ( float  yaw,
float  pitch,
float  roll 
)
inlinestatic

Creates a new Quaternion from specified yaw, pitch, and roll angles.

Parameters
yawThe yaw angle, in radians, around the y-axis.
pitchThe pitch angle, in radians, around the x-axis.
rollThe roll angle, in radians, around the z-axis.

Definition at line 453 of file Quaternion.cs.

static void VRageMath.Quaternion.CreateFromYawPitchRoll ( float  yaw,
float  pitch,
float  roll,
out Quaternion  result 
)
inlinestatic

Creates a new Quaternion from specified yaw, pitch, and roll angles.

Parameters
yawThe yaw angle, in radians, around the y-axis.
pitchThe pitch angle, in radians, around the x-axis.
rollThe roll angle, in radians, around the z-axis.
result[OutAttribute] An existing Quaternion filled in to express the specified yaw, pitch, and roll angles.

Definition at line 476 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Divide ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Divides a Quaternion by another Quaternion.

Parameters
quaternion1Source Quaternion.
quaternion2The divisor.

Definition at line 1026 of file Quaternion.cs.

static void VRageMath.Quaternion.Divide ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
out Quaternion  result 
)
inlinestatic

Divides a Quaternion by another Quaternion.

Parameters
quaternion1Source Quaternion.
quaternion2The divisor.
result[OutAttribute] Result of the division.

Definition at line 1053 of file Quaternion.cs.

static float VRageMath.Quaternion.Dot ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Calculates the dot product of two Quaternions.

Parameters
quaternion1Source Quaternion.
quaternion2Source Quaternion.

Definition at line 674 of file Quaternion.cs.

static void VRageMath.Quaternion.Dot ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
out float  result 
)
inlinestatic

Calculates the dot product of two Quaternions.

Parameters
quaternion1Source Quaternion.
quaternion2Source Quaternion.
result[OutAttribute] Dot product of the Quaternions.

Definition at line 683 of file Quaternion.cs.

bool VRageMath.Quaternion.Equals ( Quaternion  other)
inline

Determines whether the specified Object is equal to the Quaternion.

Parameters
otherThe Quaternion to compare with the current Quaternion.

Definition at line 248 of file Quaternion.cs.

bool VRageMath.Quaternion.Equals ( Quaternion  value,
float  epsilon 
)
inline

Definition at line 255 of file Quaternion.cs.

override bool VRageMath.Quaternion.Equals ( object  obj)
inline

Returns a value that indicates whether the current instance is equal to a specified object.

Parameters
objObject to make the comparison with.

Definition at line 265 of file Quaternion.cs.

int VRageMath.Quaternion.FindLargestIndex ( )
inline

Definition at line 1185 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.FromVector4 ( Vector4  v)
inlinestatic

Definition at line 1074 of file Quaternion.cs.

void VRageMath.Quaternion.GetAxisAngle ( out Vector3  axis,
out float  angle 
)
inline

Definition at line 309 of file Quaternion.cs.

float VRageMath.Quaternion.GetComponent ( int  index)
inline

Definition at line 1152 of file Quaternion.cs.

static void VRageMath.Quaternion.GetForward ( ref Quaternion  q,
out Vector3  result 
)
inlinestatic

Gets forward vector (0,0,-1) transformed by quaternion.

Definition at line 1098 of file Quaternion.cs.

override int VRageMath.Quaternion.GetHashCode ( )
inline

Get the hash code of this object.

Definition at line 276 of file Quaternion.cs.

static void VRageMath.Quaternion.GetRight ( ref Quaternion  q,
out Vector3  result 
)
inlinestatic

Gets right vector (1,0,0) transformed by quaternion.

Definition at line 1117 of file Quaternion.cs.

static void VRageMath.Quaternion.GetUp ( ref Quaternion  q,
out Vector3  result 
)
inlinestatic

Gets up vector (0,1,0) transformed by quaternion.

Definition at line 1136 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Inverse ( Quaternion  quaternion)
inlinestatic

Returns the inverse of a Quaternion.

Parameters
quaternionSource Quaternion.

Definition at line 393 of file Quaternion.cs.

static void VRageMath.Quaternion.Inverse ( ref Quaternion  quaternion,
out Quaternion  result 
)
inlinestatic

Returns the inverse of a Quaternion.

Parameters
quaternionSource Quaternion.
result[OutAttribute] The inverse of the Quaternion.

Definition at line 408 of file Quaternion.cs.

static bool VRageMath.Quaternion.IsZero ( Quaternion  value)
inlinestatic

Definition at line 1084 of file Quaternion.cs.

static bool VRageMath.Quaternion.IsZero ( Quaternion  value,
float  epsilon 
)
inlinestatic

Definition at line 1090 of file Quaternion.cs.

float VRageMath.Quaternion.Length ( )
inline

Calculates the length of a Quaternion.

Definition at line 292 of file Quaternion.cs.

float VRageMath.Quaternion.LengthSquared ( )
inline

Calculates the length squared of a Quaternion.

Definition at line 284 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Lerp ( Quaternion  quaternion1,
Quaternion  quaternion2,
float  amount 
)
inlinestatic

Linearly interpolates between two quaternions.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.
amountValue indicating how far to interpolate between the quaternions.

Definition at line 762 of file Quaternion.cs.

static void VRageMath.Quaternion.Lerp ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
float  amount,
out Quaternion  result 
)
inlinestatic

Linearly interpolates between two quaternions.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.
amountValue indicating how far to interpolate between the quaternions.
result[OutAttribute] The resulting quaternion.

Definition at line 793 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Multiply ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Multiplies two quaternions.

Parameters
quaternion1The quaternion on the left of the multiplication.
quaternion2The quaternion on the right of the multiplication.

Definition at line 950 of file Quaternion.cs.

static void VRageMath.Quaternion.Multiply ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
out Quaternion  result 
)
inlinestatic

Multiplies two quaternions.

Parameters
quaternion1The quaternion on the left of the multiplication.
quaternion2The quaternion on the right of the multiplication.
result[OutAttribute] The result of the multiplication.

Definition at line 976 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Multiply ( Quaternion  quaternion1,
float  scaleFactor 
)
inlinestatic

Multiplies a quaternion by a scalar value.

Parameters
quaternion1Source quaternion.
scaleFactorScalar value.

Definition at line 1000 of file Quaternion.cs.

static void VRageMath.Quaternion.Multiply ( ref Quaternion  quaternion1,
float  scaleFactor,
out Quaternion  result 
)
inlinestatic

Multiplies a quaternion by a scalar value.

Parameters
quaternion1Source quaternion.
scaleFactorScalar value.
result[OutAttribute] The result of the multiplication.

Definition at line 1014 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Negate ( Quaternion  quaternion)
inlinestatic

Flips the sign of each component of the quaternion.

Parameters
quaternionSource quaternion.

Definition at line 872 of file Quaternion.cs.

static void VRageMath.Quaternion.Negate ( ref Quaternion  quaternion,
out Quaternion  result 
)
inlinestatic

Flips the sign of each component of the quaternion.

Parameters
quaternionSource quaternion.
result[OutAttribute] Negated quaternion.

Definition at line 886 of file Quaternion.cs.

void VRageMath.Quaternion.Normalize ( )
inline

Divides each component of the quaternion by the length of the quaternion.

Definition at line 300 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Normalize ( Quaternion  quaternion)
inlinestatic

Divides each component of the quaternion by the length of the quaternion.

Parameters
quaternionSource quaternion.

Definition at line 329 of file Quaternion.cs.

static void VRageMath.Quaternion.Normalize ( ref Quaternion  quaternion,
out Quaternion  result 
)
inlinestatic

Divides each component of the quaternion by the length of the quaternion.

Parameters
quaternionSource quaternion.
result[OutAttribute] Normalized quaternion.

Definition at line 344 of file Quaternion.cs.

static bool VRageMath.Quaternion.operator!= ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Compare two Quaternions for inequality.

Parameters
quaternion1Source Quaternion.
quaternion2Source Quaternion.

Definition at line 124 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator* ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Multiplies two quaternions.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.

Definition at line 164 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator* ( Quaternion  quaternion1,
float  scaleFactor 
)
inlinestatic

Multiplies a quaternion by a scalar value.

Parameters
quaternion1Source quaternion.
scaleFactorScalar value.

Definition at line 190 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator+ ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Adds two Quaternions.

Parameters
quaternion1Quaternion to add.
quaternion2Quaternion to add.

Definition at line 136 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator- ( Quaternion  quaternion)
inlinestatic

Flips the sign of each component of the quaternion.

Parameters
quaternionSource quaternion.

Definition at line 98 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator- ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Subtracts a quaternion from another quaternion.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.

Definition at line 150 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.operator/ ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Divides a Quaternion by another Quaternion.

Parameters
quaternion1Source Quaternion.
quaternion2The divisor.

Definition at line 204 of file Quaternion.cs.

static bool VRageMath.Quaternion.operator== ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Compares two Quaternions for equality.

Parameters
quaternion1Source Quaternion.
quaternion2Source Quaternion.

Definition at line 112 of file Quaternion.cs.

void VRageMath.Quaternion.SetComponent ( int  index,
float  value 
)
inline

Definition at line 1169 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Slerp ( Quaternion  quaternion1,
Quaternion  quaternion2,
float  amount 
)
inlinestatic

Interpolates between two quaternions, using spherical linear interpolation.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.
amountValue that indicates how far to interpolate between the quaternions.

Definition at line 692 of file Quaternion.cs.

static void VRageMath.Quaternion.Slerp ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
float  amount,
out Quaternion  result 
)
inlinestatic

Interpolates between two quaternions, using spherical linear interpolation.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.
amountValue that indicates how far to interpolate between the quaternions.
result[OutAttribute] Result of the interpolation.

Definition at line 728 of file Quaternion.cs.

static Quaternion VRageMath.Quaternion.Subtract ( Quaternion  quaternion1,
Quaternion  quaternion2 
)
inlinestatic

Subtracts a quaternion from another quaternion.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.

Definition at line 924 of file Quaternion.cs.

static void VRageMath.Quaternion.Subtract ( ref Quaternion  quaternion1,
ref Quaternion  quaternion2,
out Quaternion  result 
)
inlinestatic

Subtracts a quaternion from another quaternion.

Parameters
quaternion1Source quaternion.
quaternion2Source quaternion.
result[OutAttribute] Result of the subtraction.

Definition at line 938 of file Quaternion.cs.

override string VRageMath.Quaternion.ToString ( )
inline

Retireves a string representation of the current object.

Definition at line 230 of file Quaternion.cs.

string VRageMath.Quaternion.ToStringAxisAngle ( string  format = "G")
inline

Definition at line 235 of file Quaternion.cs.

Vector4 VRageMath.Quaternion.ToVector4 ( )
inline

Definition at line 1079 of file Quaternion.cs.

Member Data Documentation

Quaternion VRageMath.Quaternion.Identity = new Quaternion(0.0f, 0.0f, 0.0f, 1f)
static

Definition at line 13 of file Quaternion.cs.

float VRageMath.Quaternion.W

Specifies the rotation component of the quaternion.

Definition at line 34 of file Quaternion.cs.

float VRageMath.Quaternion.X

Specifies the x-value of the vector component of the quaternion.

Definition at line 19 of file Quaternion.cs.

float VRageMath.Quaternion.Y

Specifies the y-value of the vector component of the quaternion.

Definition at line 24 of file Quaternion.cs.

float VRageMath.Quaternion.Z

Specifies the z-value of the vector component of the quaternion.

Definition at line 29 of file Quaternion.cs.

Quaternion VRageMath.Quaternion.Zero = new Quaternion(0.0f, 0.0f, 0.0f, 0.0f)
static

Definition at line 14 of file Quaternion.cs.

Property Documentation

Vector3 VRageMath.Quaternion.Forward
get

Definition at line 37 of file Quaternion.cs.

Vector3 VRageMath.Quaternion.Right
get

Definition at line 47 of file Quaternion.cs.

Vector3 VRageMath.Quaternion.Up
get

Definition at line 57 of file Quaternion.cs.


The documentation for this struct was generated from the following file: