Quaternion Struct Reference

quaternion More...

List of all members.

Public Member Functions

 Quaternion (float x, float y, float z, float w)
 constructor taking 4 floats
 Quaternion (Vector3 xyz, float w)
 constructor taking a Vector3 and a scalar float
 Quaternion (Vector4 v)
 constructor taking a Vector4
float Length ()
 return the length of this quaternion
float LengthSquared ()
 return the length squared of this quaternion
float Dot (Quaternion q)
 dot product
float Dot (ref Quaternion q)
 dot product
Quaternion Normalize ()
 return a unit quaternion
void Normalize (out Quaternion result)
 return a unit quaternion
Quaternion Conjugate ()
 quaternion conjugate
void Conjugate (out Quaternion result)
 quaternion conjugate
Quaternion Inverse ()
 quaternion inverse
void Inverse (out Quaternion result)
 quaternion inverse
Quaternion Slerp (Quaternion q, float f)
 slerp between 2 quaternions
void Slerp (ref Quaternion q, float f, out Quaternion result)
 slerp between 2 quaternions
Quaternion Lerp (Quaternion q, float f)
 lerp between 2 quaternions
void Lerp (ref Quaternion q, float f, out Quaternion result)
 lerp between 2 quaternions
Quaternion Log ()
 quaternion log
void Log (out Quaternion result)
 quaternion log
Quaternion Exp ()
 quaternion exp
void Exp (out Quaternion result)
 quaternion exp
Quaternion TurnTo (Quaternion q, float angle)
 turn to target quaternion by specified angle
void TurnTo (ref Quaternion q, float angle, out Quaternion result)
 turn to target quaternion by specified angle
float Angle (Quaternion q)
 get the angle between this and the input quaternion
float Angle (ref Quaternion q)
 get the angle between this and the input quaternion
Vector4 Transform (Vector4 v)
 return this * v
void Transform (ref Vector4 v, out Vector4 result)
 result = this * v
Vector3 Transform (Vector3 v)
 return this * v
void Transform (ref Vector3 v, out Vector3 result)
 result = this * v
Vector2 Transform (Vector2 v)
 return this * v
void Transform (ref Vector2 v, out Vector2 result)
 result = this * v
Quaternion Add (Quaternion q)
 return this + q
void Add (ref Quaternion q, out Quaternion result)
 result = this + q
Quaternion Subtract (Quaternion q)
 return this - q
void Subtract (ref Quaternion q, out Quaternion result)
 result = this - q
Quaternion Multiply (Quaternion q)
 return this * q
void Multiply (ref Quaternion q, out Quaternion result)
 result = this * q
Quaternion Multiply (float f)
 return this * f
void Multiply (float f, out Quaternion result)
 result = this * f
Quaternion Divide (float f)
 return this / f
void Divide (float f, out Quaternion result)
 result = this / f
Quaternion Negate ()
 return -this
void Negate (out Quaternion result)
 result = -this
Vector4 ToVector4 ()
 return the quaternion as a Vector4
void ToVector4 (out Vector4 result)
 return the quaternion as a Vector4
Matrix4 ToMatrix4 ()
 convert this quaternion to a Matrix4
void ToMatrix4 (out Matrix4 result)
 convert this quaternion to a Matrix4
void ToAxisAngle (out Vector3 axis, out float angle)
 extract the rotation axis and angle from this quaternion
bool IsUnit (float epsilon)
 test if this is a unit quaternion
bool IsIdentity ()
 test if this is an identity quaternion
bool IsInfinity ()
 test if any elements of this are Infinity
bool IsNaN ()
 test if any elements of this are NaN
bool Equals (Quaternion q, float epsilon)
 equality test with an epsilon
bool Equals (Quaternion q)
 equality test
override bool Equals (Object o)
 equality test
override string ToString ()
 get the string representation of this quaternion
override int GetHashCode ()
 gets the hash code for this vector

Static Public Member Functions

static Quaternion FromMatrix4 (Matrix4 m)
 return a quaternion representing a rotation matrix
static void FromMatrix4 (ref Matrix4 m, out Quaternion result)
 return a quaternion representing a rotation matrix
static Quaternion RotationAxis (Vector3 axis, float angle)
 return a quaternion representing a rotation about an arbitrary axis
static void RotationAxis (ref Vector3 axis, float angle, out Quaternion result)
 return a quaternion representing a rotation about an arbitrary axis
static Quaternion RotationX (float angle)
 return a quaternion representing a rotation about the x axis
static void RotationX (float angle, out Quaternion result)
 return a quaternion representing a rotation about the x axis
static Quaternion RotationY (float angle)
 return a quaternion representing a rotation about the y axis
static void RotationY (float angle, out Quaternion result)
 return a quaternion representing a rotation about the y axis
static Quaternion RotationZ (float angle)
 return a quaternion representing a rotation about the z axis
static void RotationZ (float angle, out Quaternion result)
 return a quaternion representing a rotation about the z axis
static Quaternion RotationZyx (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationZyx (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationZyx (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationZyx (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationYxz (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationYxz (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationYxz (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationYxz (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationXzy (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationXzy (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationXzy (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationXzy (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationXyz (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationXyz (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationXyz (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationXyz (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationYzx (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationYzx (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationYzx (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationYzx (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationZxy (float x, float y, float z)
 create a new quaternion from three euler angles
static void RotationZxy (float x, float y, float z, out Quaternion result)
 create a new quaternion from three euler angles
static Quaternion RotationZxy (Vector3 angles)
 create a new quaternion from three euler angles
static void RotationZxy (ref Vector3 angles, out Quaternion result)
 create a new quaternion from three euler angles
static float Length (Quaternion q)
 static function equivalent to Length()
static float Length (ref Quaternion q)
 static function equivalent to Length()
static float LengthSquared (Quaternion q)
 static function equivalent to LengthSquared()
static float LengthSquared (ref Quaternion q)
 static function equivalent to LengthSquared()
static float Dot (Quaternion q1, Quaternion q2)
 static function equivalent to Dot(Quaternion)
static float Dot (ref Quaternion q1, ref Quaternion q2)
 static function equivalent to Dot(ref Quaternion)
static Quaternion Normalize (Quaternion q)
 static function equivalent to Normalize()
static void Normalize (ref Quaternion q, out Quaternion result)
 static function equivalent to Normalize(out Quaternion)
static Quaternion Conjugate (Quaternion q)
 static function equivalent to Conjugate()
static void Conjugate (ref Quaternion q, out Quaternion result)
 static function equivalent to Conjugate(out Quaternion)
static Quaternion Inverse (Quaternion q)
 static function equivalent to Inverse()
static void Inverse (ref Quaternion q, out Quaternion result)
 static function equivalent to Inverse(out Quaternion)
static Quaternion Slerp (Quaternion q1, Quaternion q2, float f)
 static function equivalent to Slerp(Quaternion, float)
static void Slerp (ref Quaternion q1, ref Quaternion q2, float f, out Quaternion result)
 static function equivalent to Slerp(ref Quaternion, float, out Quaternion)
static Quaternion Lerp (Quaternion q1, Quaternion q2, float f)
 static function equivalent to Lerp(Quaternion, float)
static void Lerp (ref Quaternion q1, ref Quaternion q2, float f, out Quaternion result)
 static function equivalent to Lerp(ref Quaternion, float, out Quaternion)
static Quaternion Log (Quaternion q)
 static function equivalent to Log()
static void Log (ref Quaternion q, out Quaternion result)
 static function equivalent to Log(out Quaternion)
static Quaternion Exp (Quaternion q)
 static function equivalent to Exp()
static void Exp (ref Quaternion q, out Quaternion result)
 static function equivalent to Exp(out Quaternion)
static Quaternion TurnTo (Quaternion q1, Quaternion q2, float angle)
 static function equivalent to TurnTo(Quaternion, float)
static void TurnTo (ref Quaternion q1, ref Quaternion q2, float angle, out Quaternion result)
 static function equivalent to TurnTo(ref Quaternion, float, out Quaternion)
static float Angle (Quaternion q1, Quaternion q2)
 static function equivalent to Angle(Quaternion)
static float Angle (ref Quaternion q1, ref Quaternion q2)
 static function equivalent to Angle(ref Quaternion)
static Vector4 Transform (Quaternion q, Vector4 v)
 static function equivalent to Transform(Vector4)
static void Transform (ref Quaternion q, ref Vector4 v, out Vector4 result)
 static function equivalent to Transform(ref Vector4, out Vector4)
static Vector3 Transform (Quaternion q, Vector3 v)
 static function equivalent to Transform(Vector3)
static void Transform (ref Quaternion q, ref Vector3 v, out Vector3 result)
 static function equivalent to Transform(ref Vector3, out Vector3)
static Vector2 Transform (Quaternion q, Vector2 v)
 static function equivalent to Transform(Vector2)
static void Transform (ref Quaternion q, ref Vector2 v, out Vector2 result)
 static function equivalent to Transform(ref Vector2, out Vector2)
static Quaternion Add (Quaternion q1, Quaternion q2)
 static function equivalent to Add(Quaternion)
static void Add (ref Quaternion q1, ref Quaternion q2, out Quaternion result)
 static function equivalent to Add(ref Quaternion, out Quaternion)
static Quaternion Subtract (Quaternion q1, Quaternion q2)
 static function equivalent to Subtract(Quaternion)
static void Subtract (ref Quaternion q1, ref Quaternion q2, out Quaternion result)
 static function equivalent to Subtract(ref Quaternion, out Quaternion)
static Quaternion Multiply (Quaternion q1, Quaternion q2)
 static function equivalent to Multiply(Quaternion)
static void Multiply (ref Quaternion q1, ref Quaternion q2, out Quaternion result)
 static function equivalent to Multiply(ref Quaternion, out Quaternion)
static Quaternion Multiply (Quaternion q, float f)
 static function equivalent to Multiply(float)
static void Multiply (ref Quaternion q, float f, out Quaternion result)
 static function equivalent to Multiply(float, out Quaternion)
static Quaternion Divide (Quaternion q, float f)
 static function equivalent to Divide(float)
static void Divide (ref Quaternion q, float f, out Quaternion result)
 static function equivalent to Divide(float, out Quaternion)
static Quaternion Negate (Quaternion q)
 static function equivalent to Negate()
static void Negate (ref Quaternion q, out Quaternion result)
 static function equivalent to Negate(out Quaternion)
static bool operator== (Quaternion q1, Quaternion q2)
 equality operator
static bool operator!= (Quaternion q1, Quaternion q2)
 not equals operator
static Quaternion operator+ (Quaternion q1, Quaternion q2)
 addition operator
static Quaternion operator- (Quaternion q1, Quaternion q2)
 subtraction operator
static Quaternion operator- (Quaternion q)
 unary minus operator
static Quaternion operator* (Quaternion q1, Quaternion q2)
 multiplication operator
static Quaternion operator* (Quaternion q, float f)
 multiply a quaternion by a scalar float
static Quaternion operator* (float f, Quaternion q)
 multiply a quaternion by a scalar float
static Quaternion operator/ (Quaternion q, float f)
 division operator

Public Attributes

float X
 X.
float Y
 Y.
float Z
 Z.
float W
 W.

Static Public Attributes

static readonly Quaternion Identity = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f)
 identity quaternion

Detailed Description

quaternion


Constructor & Destructor Documentation

Quaternion ( float  x,
float  y,
float  z,
float  w 
)

constructor taking 4 floats

Parameters:
xx value to init with
yy value to init with
zz value to init with
ww value to init with
Quaternion ( Vector3  xyz,
float  w 
)

constructor taking a Vector3 and a scalar float

Parameters:
xyzthe x, y, z values to init with
wthe w value to init with

constructor taking a Vector4

Parameters:
vthe vector to init with

Member Function Documentation

Quaternion Add ( Quaternion  q)

return this + q

Parameters:
qquaternion
Returns:
this + q
void Add ( ref Quaternion  q,
out Quaternion  result 
)

result = this + q

Parameters:
qquaternion
resultthis + q
static Quaternion Add ( Quaternion  q1,
Quaternion  q2 
) [static]

static function equivalent to Add(Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
q1 + q2
static void Add ( ref Quaternion  q1,
ref Quaternion  q2,
out Quaternion  result 
) [static]

static function equivalent to Add(ref Quaternion, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
resultq1 + q2
float Angle ( ref Quaternion  q)

get the angle between this and the input quaternion

Parameters:
qthe quaternion to get the angle to
Returns:
the angle between this and q
static float Angle ( Quaternion  q1,
Quaternion  q2 
) [static]

static function equivalent to Angle(Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
the angle between q1 and q2
float Angle ( Quaternion  q)

get the angle between this and the input quaternion

Parameters:
qthe quaternion to get the angle to
Returns:
the angle between this and v
static float Angle ( ref Quaternion  q1,
ref Quaternion  q2 
) [static]

static function equivalent to Angle(ref Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
the angle between q1 and q2
Quaternion Conjugate ( )

quaternion conjugate

Returns:
quaternion conjugate
void Conjugate ( out Quaternion  result)

quaternion conjugate

Parameters:
resultquaternion conjugate
static void Conjugate ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Conjugate(out Quaternion)

Parameters:
qquaternion
resultquaternion conjugate
static Quaternion Conjugate ( Quaternion  q) [static]

static function equivalent to Conjugate()

Parameters:
qquaternion
Returns:
quaternion conjugate
Quaternion Divide ( float  f)

return this / f

Parameters:
fscalar
Returns:
this / f
static void Divide ( ref Quaternion  q,
float  f,
out Quaternion  result 
) [static]

static function equivalent to Divide(float, out Quaternion)

Parameters:
qquaternion
fscalar
resultq / f
void Divide ( float  f,
out Quaternion  result 
)

result = this / f

Parameters:
fscalar
resultthis / f
static Quaternion Divide ( Quaternion  q,
float  f 
) [static]

static function equivalent to Divide(float)

Parameters:
qquaternion
fscalar
Returns:
q / f
float Dot ( ref Quaternion  q)

dot product

Parameters:
qquaternion to take the dot product with
Returns:
dot product of this and q
static float Dot ( Quaternion  q1,
Quaternion  q2 
) [static]

static function equivalent to Dot(Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
dot product of q1 and q2
static float Dot ( ref Quaternion  q1,
ref Quaternion  q2 
) [static]

static function equivalent to Dot(ref Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
dot product of q1 and q2
float Dot ( Quaternion  q)

dot product

Parameters:
qquaternion to take the dot product with
Returns:
dot product of this and q
bool Equals ( Quaternion  q,
float  epsilon 
)

equality test with an epsilon

Parameters:
qthe quaternion to compare this to
epsilonthe epsilon to use in comparison
Returns:
true if for every element n, abs(this[n] - q[n]) <= epsilon, false otherwise
bool Equals ( Quaternion  q)

equality test

Parameters:
qthe quaternion to compare this to
Returns:
true if this == q, false otherwise
override bool Equals ( Object  o)

equality test

Parameters:
othe object to compare this to
Returns:
true if this == o, false otherwise
Quaternion Exp ( )

quaternion exp

Returns:
quaternion exp
void Exp ( out Quaternion  result)

quaternion exp

Parameters:
resultquaternion exp
static Quaternion Exp ( Quaternion  q) [static]

static function equivalent to Exp()

Parameters:
qquaternion
Returns:
quaternion exp
static void Exp ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Exp(out Quaternion)

Parameters:
qquaternion
resultquaternion exp
static Quaternion FromMatrix4 ( Matrix4  m) [static]

return a quaternion representing a rotation matrix

Parameters:
mmatrix to form the quaternion out of
Returns:
a quaternion representing a rotation matrix
static void FromMatrix4 ( ref Matrix4  m,
out Quaternion  result 
) [static]

return a quaternion representing a rotation matrix

Parameters:
mmatrix to form the quaternion out of
resulta quaternion representing a rotation matrix
override int GetHashCode ( )

gets the hash code for this vector

Returns:
integer hash code
Quaternion Inverse ( )

quaternion inverse

Returns:
quaternion inverse
void Inverse ( out Quaternion  result)

quaternion inverse

Parameters:
resultquaternion inverse
static Quaternion Inverse ( Quaternion  q) [static]

static function equivalent to Inverse()

Parameters:
qquaternion
Returns:
quaternion inverse
static void Inverse ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Inverse(out Quaternion)

Parameters:
qquaternion
resultquaternion inverse
bool IsIdentity ( )

test if this is an identity quaternion

Returns:
true if this is an identity quaternion, false otherwise
bool IsInfinity ( )

test if any elements of this are Infinity

Returns:
true if any elements of this are Infinity, false otherwise
bool IsNaN ( )

test if any elements of this are NaN

Returns:
true if any elements of this are NaN, false otherwise
bool IsUnit ( float  epsilon)

test if this is a unit quaternion

Parameters:
epsilonepsilon used in testing
Returns:
true if this is a unit quaternion, false otherwise
static float Length ( Quaternion  q) [static]

static function equivalent to Length()

Parameters:
qquaternion
Returns:
the length of quaternion
static float Length ( ref Quaternion  q) [static]

static function equivalent to Length()

Parameters:
qquaternion
Returns:
the length of quaternion
float Length ( )

return the length of this quaternion

Returns:
the length of this quaternion
float LengthSquared ( )

return the length squared of this quaternion

Returns:
the length squared of this quaternion
static float LengthSquared ( Quaternion  q) [static]

static function equivalent to LengthSquared()

Parameters:
qquaternion
Returns:
the length squared of quaternion
static float LengthSquared ( ref Quaternion  q) [static]

static function equivalent to LengthSquared()

Parameters:
qquaternion
Returns:
the length squared of quaternion
Quaternion Lerp ( Quaternion  q,
float  f 
)

lerp between 2 quaternions

Parameters:
qsecond quaternion
flerp amount
Returns:
lerp between this and q
static Quaternion Lerp ( Quaternion  q1,
Quaternion  q2,
float  f 
) [static]

static function equivalent to Lerp(Quaternion, float)

Parameters:
q1quaternion 1
q2quaternion 2
flerp amount
Returns:
lerp between q1 and q2
static void Lerp ( ref Quaternion  q1,
ref Quaternion  q2,
float  f,
out Quaternion  result 
) [static]

static function equivalent to Lerp(ref Quaternion, float, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
flerp amount
resultlerp between q1 and q2
void Lerp ( ref Quaternion  q,
float  f,
out Quaternion  result 
)

lerp between 2 quaternions

Parameters:
qsecond quaternion
flerp amount
resultlerp between this and q
void Log ( out Quaternion  result)

quaternion log

Parameters:
resultquaternion log
static Quaternion Log ( Quaternion  q) [static]

static function equivalent to Log()

Parameters:
qquaternion
Returns:
quaternion log
static void Log ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Log(out Quaternion)

Parameters:
qquaternion
resultquaternion log
Quaternion Log ( )

quaternion log

Returns:
quaternion log
Quaternion Multiply ( Quaternion  q)

return this * q

Parameters:
qquaternion
Returns:
this * q
void Multiply ( ref Quaternion  q,
out Quaternion  result 
)

result = this * q

Parameters:
qquaternion
resultthis * q
Quaternion Multiply ( float  f)

return this * f

Parameters:
fscalar
Returns:
this * f
void Multiply ( float  f,
out Quaternion  result 
)

result = this * f

Parameters:
fscalar
resultthis * f
static void Multiply ( ref Quaternion  q,
float  f,
out Quaternion  result 
) [static]

static function equivalent to Multiply(float, out Quaternion)

Parameters:
qquaternion
fscalar
resultq * f
static Quaternion Multiply ( Quaternion  q1,
Quaternion  q2 
) [static]

static function equivalent to Multiply(Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
q1 * q2
static Quaternion Multiply ( Quaternion  q,
float  f 
) [static]

static function equivalent to Multiply(float)

Parameters:
qquaternion
fscalar
Returns:
q * f
static void Multiply ( ref Quaternion  q1,
ref Quaternion  q2,
out Quaternion  result 
) [static]

static function equivalent to Multiply(ref Quaternion, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
resultq1 * q2
static Quaternion Negate ( Quaternion  q) [static]

static function equivalent to Negate()

Parameters:
qquaternion
Returns:
-q
static void Negate ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Negate(out Quaternion)

Parameters:
qquaternion
result-q
Quaternion Negate ( )

return -this

Returns:
-this
void Negate ( out Quaternion  result)

result = -this

Parameters:
result-this
Quaternion Normalize ( )

return a unit quaternion

Returns:
this as a unit quaternion
static Quaternion Normalize ( Quaternion  q) [static]

static function equivalent to Normalize()

Parameters:
qquaternion
Returns:
q as a unit quaternion
static void Normalize ( ref Quaternion  q,
out Quaternion  result 
) [static]

static function equivalent to Normalize(out Quaternion)

Parameters:
qquaternion
resultq as a unit quaternion
void Normalize ( out Quaternion  result)

return a unit quaternion

Parameters:
resultthis as a unit quaternion
static bool operator!= ( Quaternion  q1,
Quaternion  q2 
) [static]

not equals operator

Parameters:
q1first quaternion to compare
q2second quaternion to compare
Returns:
true if q1 != q2, false otherwise
static Quaternion operator* ( Quaternion  q1,
Quaternion  q2 
) [static]

multiplication operator

Parameters:
q1first value to multiply
q2second value to multiply
Returns:
q1 * q2
static Quaternion operator* ( float  f,
Quaternion  q 
) [static]

multiply a quaternion by a scalar float

Parameters:
ffloat to multiply by
qquaternion to multiply
Returns:
f * q
static Quaternion operator* ( Quaternion  q,
float  f 
) [static]

multiply a quaternion by a scalar float

Parameters:
qquaternion to multiply
ffloat to multiply by
Returns:
q * f
static Quaternion operator+ ( Quaternion  q1,
Quaternion  q2 
) [static]

addition operator

Parameters:
q1first quaternion to add
q2second quaternion to add
Returns:
q1 + q2
static Quaternion operator- ( Quaternion  q1,
Quaternion  q2 
) [static]

subtraction operator

Parameters:
q1value to subtract from
q2value to subtract
Returns:
q1 - q2
static Quaternion operator- ( Quaternion  q) [static]

unary minus operator

Parameters:
qquaternion to negate
Returns:
unary minus applied to each member of q
static Quaternion operator/ ( Quaternion  q,
float  f 
) [static]

division operator

Parameters:
qquaternion to divide
fscalar float value to divide by
Returns:
q / f
static bool operator== ( Quaternion  q1,
Quaternion  q2 
) [static]

equality operator

Parameters:
q1first quaternion to compare
q2second quaternion to compare
Returns:
true if q1 == q2, false otherwise
static Quaternion RotationAxis ( Vector3  axis,
float  angle 
) [static]

return a quaternion representing a rotation about an arbitrary axis

Parameters:
axisthe axis to rotate about
anglethe angle to rotate
Returns:
a quaternion representing a rotation about an arbitrary axis
static void RotationAxis ( ref Vector3  axis,
float  angle,
out Quaternion  result 
) [static]

return a quaternion representing a rotation about an arbitrary axis

Parameters:
axisthe axis to rotate about
anglethe angle to rotate
resulta quaternion representing a rotation about an arbitrary axis
static Quaternion RotationX ( float  angle) [static]

return a quaternion representing a rotation about the x axis

Parameters:
anglethe angle to rotate by
Returns:
a quaternion representing a rotation about the x axis
static void RotationX ( float  angle,
out Quaternion  result 
) [static]

return a quaternion representing a rotation about the x axis

Parameters:
anglethe angle to rotate by
resulta quaternion representing a rotation about the x axis
static Quaternion RotationXyz ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static void RotationXyz ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static Quaternion RotationXyz ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe x, y, z euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static void RotationXyz ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe x, y, z euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static Quaternion RotationXzy ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static void RotationXzy ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static void RotationXzy ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe x, z, y euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static Quaternion RotationXzy ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe x, z, y euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static void RotationY ( float  angle,
out Quaternion  result 
) [static]

return a quaternion representing a rotation about the y axis

Parameters:
anglethe angle to rotate by
resulta quaternion representing a rotation about the y axis
static Quaternion RotationY ( float  angle) [static]

return a quaternion representing a rotation about the y axis

Parameters:
anglethe angle to rotate by
Returns:
a quaternion representing a rotation about the y axis
static void RotationYxz ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe y, x, z euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static Quaternion RotationYxz ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe y, x, z euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static void RotationYxz ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static Quaternion RotationYxz ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static Quaternion RotationYzx ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static void RotationYzx ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static void RotationYzx ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe y, z, x euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static Quaternion RotationYzx ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe y, z, x euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static void RotationZ ( float  angle,
out Quaternion  result 
) [static]

return a quaternion representing a rotation about the z axis

Parameters:
anglethe angle to rotate by
resulta quaternion representing a rotation about the z axis
static Quaternion RotationZ ( float  angle) [static]

return a quaternion representing a rotation about the z axis

Parameters:
anglethe angle to rotate by
Returns:
a quaternion representing a rotation about the z axis
static Quaternion RotationZxy ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe z, x, y euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static Quaternion RotationZxy ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static void RotationZxy ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static void RotationZxy ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe z, x, y euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static Quaternion RotationZyx ( float  x,
float  y,
float  z 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
Returns:
a new quaternion from the three euler angles
static Quaternion RotationZyx ( Vector3  angles) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe z, y, x euler angles used to create the quaternion
Returns:
a new quaternion from the three euler angles
static void RotationZyx ( float  x,
float  y,
float  z,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
xx angle
yy angle
zz angle
resulta new quaternion from the three euler angles
static void RotationZyx ( ref Vector3  angles,
out Quaternion  result 
) [static]

create a new quaternion from three euler angles

Parameters:
anglesthe z, y, x euler angles used to create the quaternion
resulta new quaternion from the three euler angles
static void Slerp ( ref Quaternion  q1,
ref Quaternion  q2,
float  f,
out Quaternion  result 
) [static]

static function equivalent to Slerp(ref Quaternion, float, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
fslerp amount
resultslerp between q1 and q2
Quaternion Slerp ( Quaternion  q,
float  f 
)

slerp between 2 quaternions

Parameters:
qsecond quaternion
fslerp amount
Returns:
slerp between this and q
static Quaternion Slerp ( Quaternion  q1,
Quaternion  q2,
float  f 
) [static]

static function equivalent to Slerp(Quaternion, float)

Parameters:
q1quaternion 1
q2quaternion 2
fslerp amount
Returns:
slerp between q1 and q2
void Slerp ( ref Quaternion  q,
float  f,
out Quaternion  result 
)

slerp between 2 quaternions

Parameters:
qsecond quaternion
fslerp amount
resultslerp between this and q
Quaternion Subtract ( Quaternion  q)

return this - q

Parameters:
qquaternion
Returns:
this - q
static Quaternion Subtract ( Quaternion  q1,
Quaternion  q2 
) [static]

static function equivalent to Subtract(Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
Returns:
q1 - q2
void Subtract ( ref Quaternion  q,
out Quaternion  result 
)

result = this - q

Parameters:
qquaternion
resultthis - q
static void Subtract ( ref Quaternion  q1,
ref Quaternion  q2,
out Quaternion  result 
) [static]

static function equivalent to Subtract(ref Quaternion, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
resultq1 - q2
void ToAxisAngle ( out Vector3  axis,
out float  angle 
)

extract the rotation axis and angle from this quaternion

Parameters:
axisthe rotation axis
anglethe rotation angle
void ToMatrix4 ( out Matrix4  result)

convert this quaternion to a Matrix4

Parameters:
resultMatrix4 representation of this quaternion
Matrix4 ToMatrix4 ( )

convert this quaternion to a Matrix4

Returns:
Matrix4 representation of this quaternion
override string ToString ( )

get the string representation of this quaternion

Returns:
the string representation of this quaternion
void ToVector4 ( out Vector4  result)

return the quaternion as a Vector4

Parameters:
resultthe quaternion as a Vector4
Vector4 ToVector4 ( )

return the quaternion as a Vector4

Returns:
the quaternion as a Vector4
static void Transform ( ref Quaternion  q,
ref Vector4  v,
out Vector4  result 
) [static]

static function equivalent to Transform(ref Vector4, out Vector4)

Parameters:
qquaternion
vvector
resultq * v
static void Transform ( ref Quaternion  q,
ref Vector3  v,
out Vector3  result 
) [static]

static function equivalent to Transform(ref Vector3, out Vector3)

Parameters:
qquaternion
vvector
resultq * v
Vector3 Transform ( Vector3  v)

return this * v

Parameters:
vvector
Returns:
this * v

>

Vector2 Transform ( Vector2  v)

return this * v

Parameters:
vvector
Returns:
this * v

>

void Transform ( ref Vector3  v,
out Vector3  result 
)

result = this * v

Parameters:
vvector
resultthis * v
static Vector3 Transform ( Quaternion  q,
Vector3  v 
) [static]

static function equivalent to Transform(Vector3)

Parameters:
qquaternion
vvector
Returns:
q * v
void Transform ( ref Vector2  v,
out Vector2  result 
)

result = this * v

Parameters:
vvector
resultthis * v
void Transform ( ref Vector4  v,
out Vector4  result 
)

result = this * v

Parameters:
vvector
resultthis * v
static void Transform ( ref Quaternion  q,
ref Vector2  v,
out Vector2  result 
) [static]

static function equivalent to Transform(ref Vector2, out Vector2)

Parameters:
qquaternion
vvector
resultq * v
static Vector2 Transform ( Quaternion  q,
Vector2  v 
) [static]

static function equivalent to Transform(Vector2)

Parameters:
qquaternion
vvector
Returns:
q * v
Vector4 Transform ( Vector4  v)

return this * v

Parameters:
vvector
Returns:
this * v

>

static Vector4 Transform ( Quaternion  q,
Vector4  v 
) [static]

static function equivalent to Transform(Vector4)

Parameters:
qquaternion
vvector
Returns:
q * v
static Quaternion TurnTo ( Quaternion  q1,
Quaternion  q2,
float  angle 
) [static]

static function equivalent to TurnTo(Quaternion, float)

Parameters:
q1quaternion 1
q2quaternion 2
anglestep angle
Returns:
a new quaternion turned to target quaternion by specified angle
Quaternion TurnTo ( Quaternion  q,
float  angle 
)

turn to target quaternion by specified angle

Parameters:
qtarget quaternion
anglestep angle
Returns:
a new quaternion turned to target quaternion by specified angle
static void TurnTo ( ref Quaternion  q1,
ref Quaternion  q2,
float  angle,
out Quaternion  result 
) [static]

static function equivalent to TurnTo(ref Quaternion, float, out Quaternion)

Parameters:
q1quaternion 1
q2quaternion 2
anglestep angle
resulta new quaternion turned to target quaternion by specified angle
void TurnTo ( ref Quaternion  q,
float  angle,
out Quaternion  result 
)

turn to target quaternion by specified angle

Parameters:
qtarget quaternion
anglestep angle
resulta new quaternion turned to target quaternion by specified angle

Member Data Documentation

readonly Quaternion Identity = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f) [static]

identity quaternion

float W

W.

float X

X.

float Y

Y.

float Z

Z.