VR-Link C# API Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties
makVrl.Quaterniond Struct Reference

Represents a double-precision Quaternion. More...

+ Inheritance diagram for makVrl.Quaterniond:
+ Collaboration diagram for makVrl.Quaterniond:

Public Member Functions

 Quaterniond (Vector3d v, double w)
 Construct a new Quaterniond from vector and w components More...
 
 Quaterniond (double x, double y, double z, double w)
 Construct a new Quaterniond More...
 
void ToAxisAngle (out Vector3d axis, out double angle)
 Convert the current quaternion to axis angle representation More...
 
void ToAxisAngle (out Vector3f axis, out double angle)
 Convert the current quaternion to axis angle representation More...
 
Vector4d ToAxisAngle ()
 Convert this instance to an axis-angle representation. More...
 
Quaterniond Normalized ()
 Returns a copy of the Quaterniond scaled to unit length. More...
 
void Invert ()
 Reverses the rotation angle of this Quaterniond. More...
 
Quaterniond Inverted ()
 Returns a copy of this Quaterniond with its rotation angle reversed. More...
 
void Normalize ()
 Scales the Quaterniond to unit length. More...
 
void Conjugate ()
 Inverts the Vector3d component of this Quaterniond. More...
 
override string ToString ()
 Returns a System.String that represents the current Quaterniond. More...
 
override bool Equals (object other)
 Compares this object instance to another object for equality. More...
 
override int GetHashCode ()
 Provides the hash code for this object. More...
 
bool Equals (Quaterniond other)
 Compares this Quaterniond instance to another Quaterniond for equality. More...
 

Static Public Member Functions

static Quaterniond Add (Quaterniond left, Quaterniond right)
 Add two quaternions More...
 
static void Add (ref Quaterniond left, ref Quaterniond right, out Quaterniond result)
 Add two quaternions More...
 
static Quaterniond Sub (Quaterniond left, Quaterniond right)
 Subtracts two instances. More...
 
static void Sub (ref Quaterniond left, ref Quaterniond right, out Quaterniond result)
 Subtracts two instances. More...
 
static Quaterniond Mult (Quaterniond left, Quaterniond right)
 Multiplies two instances. More...
 
static void Mult (ref Quaterniond left, ref Quaterniond right, out Quaterniond result)
 Multiplies two instances. More...
 
static Quaterniond Multiply (Quaterniond left, Quaterniond right)
 Multiplies two instances. More...
 
static void Multiply (ref Quaterniond left, ref Quaterniond right, out Quaterniond result)
 Multiplies two instances. More...
 
static void Multiply (ref Quaterniond quaternion, double scale, out Quaterniond result)
 Multiplies an instance by a scalar. More...
 
static Quaterniond Multiply (Quaterniond quaternion, double scale)
 Multiplies an instance by a scalar. More...
 
static Quaterniond Conjugate (Quaterniond q)
 Get the conjugate of the given Quaterniond More...
 
static void Conjugate (ref Quaterniond q, out Quaterniond result)
 Get the conjugate of the given Quaterniond More...
 
static Quaterniond Invert (Quaterniond q)
 Get the inverse of the given Quaterniond More...
 
static void Invert (ref Quaterniond q, out Quaterniond result)
 Get the inverse of the given Quaterniond More...
 
static Quaterniond Normalize (Quaterniond q)
 Scale the given Quaterniond to unit length More...
 
static void Normalize (ref Quaterniond q, out Quaterniond result)
 Scale the given Quaterniond to unit length More...
 
static Quaterniond FromAxisAngle (Vector3d axis, double angle)
 Build a Quaterniond from the given axis and angle More...
 
static Quaterniond FromMatrix (Matrix3d matrix)
 Builds a quaternion from the given rotation matrix More...
 
static void FromMatrix (ref Matrix3d matrix, out Quaterniond result)
 Builds a quaternion from the given rotation matrix More...
 
static Quaterniond Slerp (Quaterniond q1, Quaterniond q2, double blend)
 Do Spherical linear interpolation between two quaternions More...
 
static Quaterniond operator+ (Quaterniond left, Quaterniond right)
 Adds two instances. More...
 
static Quaterniond operator- (Quaterniond left, Quaterniond right)
 Subtracts two instances. More...
 
static Quaterniond operator* (Quaterniond left, Quaterniond right)
 Multiplies two instances. More...
 
static Quaterniond operator* (Quaterniond quaternion, double scale)
 Multiplies an instance by a scalar. More...
 
static Quaterniond operator* (double scale, Quaterniond quaternion)
 Multiplies an instance by a scalar. More...
 
static bool operator== (Quaterniond left, Quaterniond right)
 Compares two instances for equality. More...
 
static bool operator!= (Quaterniond left, Quaterniond right)
 Compares two instances for inequality. More...
 

Public Attributes

Vector3d xyz
 
double w
 

Static Public Attributes

static readonly Quaterniond Identity = new Quaterniond(0, 0, 0, 1)
 Defines the identity quaternion. More...
 

Properties

Vector3d XYZ [get, set]
 Gets or sets an makVrl.Vector3d with the X, Y and Z components of this instance. More...
 
Vector3d Xyz [get, set]
 Gets or sets an makVrl.Vector3d with the X, Y and Z components of this instance. More...
 
double X [get, set]
 Gets or sets the X component of this instance. More...
 
double Y [get, set]
 Gets or sets the Y component of this instance. More...
 
double Z [get, set]
 Gets or sets the Z component of this instance. More...
 
double W [get, set]
 Gets or sets the W component of this instance. More...
 
double Length [get]
 Gets the length (magnitude) of the Quaterniond. More...
 
double LengthSquared [get]
 Gets the square of the Quaterniond length (magnitude). More...
 

Detailed Description

Represents a double-precision Quaternion.

Constructor & Destructor Documentation

makVrl.Quaterniond.Quaterniond ( Vector3d  v,
double  w 
)
inline
makVrl.Quaterniond.Quaterniond ( double  x,
double  y,
double  z,
double  w 
)
inline

Construct a new Quaterniond

Parameters
xThe x component
yThe y component
zThe z component
wThe w component

Member Function Documentation

static Quaterniond makVrl.Quaterniond.Add ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Add two quaternions

Parameters
leftThe first operand
rightThe second operand
Returns
The result of the addition

References makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static void makVrl.Quaterniond.Add ( ref Quaterniond  left,
ref Quaterniond  right,
out Quaterniond  result 
)
inlinestatic

Add two quaternions

Parameters
leftThe first operand
rightThe second operand
resultThe result of the addition

References makVrl.Quaterniond.Quaterniond().

void makVrl.Quaterniond.Conjugate ( )
inline

Inverts the Vector3d component of this Quaterniond.

References makVrl.Quaterniond.Xyz.

static Quaterniond makVrl.Quaterniond.Conjugate ( Quaterniond  q)
inlinestatic

Get the conjugate of the given Quaterniond

Parameters
qThe Quaterniond
Returns
The conjugate of the given Quaterniond

References makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static void makVrl.Quaterniond.Conjugate ( ref Quaterniond  q,
out Quaterniond  result 
)
inlinestatic

Get the conjugate of the given Quaterniond

Parameters
qThe Quaterniond
resultThe conjugate of the given Quaterniond

References makVrl.Quaterniond.Quaterniond().

override bool makVrl.Quaterniond.Equals ( object  other)
inline

Compares this object instance to another object for equality.

Parameters
otherThe other object to be used in the comparison.
Returns
True if both objects are Quaternions of equal value. Otherwise it returns false.

References makVrl.Quaterniond.Quaterniond().

bool makVrl.Quaterniond.Equals ( Quaterniond  other)
inline

Compares this Quaterniond instance to another Quaterniond for equality.

Parameters
otherThe other Quaterniond to be used in the comparison.
Returns
True if both instances are equal; false otherwise.

References makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static Quaterniond makVrl.Quaterniond.FromAxisAngle ( Vector3d  axis,
double  angle 
)
inlinestatic

Build a Quaterniond from the given axis and angle

Parameters
axisThe axis to rotate about
angleThe rotation angle in radians
Returns

References makVrl.Quaterniond.Identity, makVrl.Vector3d.LengthSquared, and makVrl.Quaterniond.Normalize().

static Quaterniond makVrl.Quaterniond.FromMatrix ( Matrix3d  matrix)
inlinestatic

Builds a quaternion from the given rotation matrix

Parameters
matrixA rotation matrix
Returns
The equivalent quaternion
static void makVrl.Quaterniond.FromMatrix ( ref Matrix3d  matrix,
out Quaterniond  result 
)
inlinestatic

Builds a quaternion from the given rotation matrix

Parameters
matrixA rotation matrix
resultThe equivalent quaternion
override int makVrl.Quaterniond.GetHashCode ( )
inline

Provides the hash code for this object.

Returns
A hash code formed from the bitwise XOR of this objects members.

References makVrl.Quaterniond.W.

void makVrl.Quaterniond.Invert ( )
inline

Reverses the rotation angle of this Quaterniond.

References makVrl.Quaterniond.W.

Referenced by makVrl.Quaterniond.Invert().

static Quaterniond makVrl.Quaterniond.Invert ( Quaterniond  q)
inlinestatic

Get the inverse of the given Quaterniond

Parameters
qThe Quaterniond to invert
Returns
The inverse of the given Quaterniond

References makVrl.Quaterniond.Invert().

static void makVrl.Quaterniond.Invert ( ref Quaterniond  q,
out Quaterniond  result 
)
inlinestatic

Get the inverse of the given Quaterniond

Parameters
qThe Quaterniond to invert
resultThe inverse of the given Quaterniond

References makVrl.Quaterniond.Quaterniond().

Quaterniond makVrl.Quaterniond.Inverted ( )
inline

Returns a copy of this Quaterniond with its rotation angle reversed.

static Quaterniond makVrl.Quaterniond.Mult ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Multiplies two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
A new instance containing the result of the calculation.

References makVrl.Vector3d.Cross(), makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static void makVrl.Quaterniond.Mult ( ref Quaterniond  left,
ref Quaterniond  right,
out Quaterniond  result 
)
inlinestatic

Multiplies two instances.

Parameters
leftThe first instance.
rightThe second instance.
resultA new instance containing the result of the calculation.

References makVrl.Vector3d.Cross(), and makVrl.Quaterniond.Quaterniond().

static Quaterniond makVrl.Quaterniond.Multiply ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Multiplies two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
A new instance containing the result of the calculation.

Referenced by makVrl.Quaterniond.operator*().

static void makVrl.Quaterniond.Multiply ( ref Quaterniond  left,
ref Quaterniond  right,
out Quaterniond  result 
)
inlinestatic

Multiplies two instances.

Parameters
leftThe first instance.
rightThe second instance.
resultA new instance containing the result of the calculation.

References makVrl.Vector3d.Cross(), and makVrl.Quaterniond.Quaterniond().

static void makVrl.Quaterniond.Multiply ( ref Quaterniond  quaternion,
double  scale,
out Quaterniond  result 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
quaternionThe instance.
scaleThe scalar.
resultA new instance containing the result of the calculation.

References makVrl.Quaterniond.Quaterniond().

static Quaterniond makVrl.Quaterniond.Multiply ( Quaterniond  quaternion,
double  scale 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
quaternionThe instance.
scaleThe scalar.
Returns
A new instance containing the result of the calculation.

References makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, makVrl.Quaterniond.X, makVrl.Quaterniond.Y, and makVrl.Quaterniond.Z.

void makVrl.Quaterniond.Normalize ( )
inline
static Quaterniond makVrl.Quaterniond.Normalize ( Quaterniond  q)
inlinestatic

Scale the given Quaterniond to unit length

Parameters
qThe Quaterniond to normalize
Returns
The normalized Quaterniond

References makVrl.Quaterniond.Normalize().

static void makVrl.Quaterniond.Normalize ( ref Quaterniond  q,
out Quaterniond  result 
)
inlinestatic

Scale the given Quaterniond to unit length

Parameters
qThe Quaterniond to normalize
resultThe normalized Quaterniond

References makVrl.Quaterniond.Quaterniond().

Quaterniond makVrl.Quaterniond.Normalized ( )
inline

Returns a copy of the Quaterniond scaled to unit length.

static bool makVrl.Quaterniond.operator!= ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Compares two instances for inequality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left does not equal right; false otherwise.
static Quaterniond makVrl.Quaterniond.operator* ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Multiplies two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.

References makVrl.Quaterniond.Multiply().

static Quaterniond makVrl.Quaterniond.operator* ( Quaterniond  quaternion,
double  scale 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
quaternionThe instance.
scaleThe scalar.
Returns
A new instance containing the result of the calculation.

References makVrl.Quaterniond.Multiply().

static Quaterniond makVrl.Quaterniond.operator* ( double  scale,
Quaterniond  quaternion 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
quaternionThe instance.
scaleThe scalar.
Returns
A new instance containing the result of the calculation.

References makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, makVrl.Quaterniond.X, makVrl.Quaterniond.Y, and makVrl.Quaterniond.Z.

static Quaterniond makVrl.Quaterniond.operator+ ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Adds two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.
static Quaterniond makVrl.Quaterniond.operator- ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Subtracts two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.
static bool makVrl.Quaterniond.operator== ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.
static Quaterniond makVrl.Quaterniond.Slerp ( Quaterniond  q1,
Quaterniond  q2,
double  blend 
)
inlinestatic

Do Spherical linear interpolation between two quaternions

Parameters
q1The first Quaterniond
q2The second Quaterniond
blendThe blend factor
Returns
A smooth blend between the given quaternions

References makVrl.Quaterniond.Identity, makVrl.Quaterniond.LengthSquared, makVrl.Quaterniond.Normalize(), makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static Quaterniond makVrl.Quaterniond.Sub ( Quaterniond  left,
Quaterniond  right 
)
inlinestatic

Subtracts two instances.

Parameters
leftThe left instance.
rightThe right instance.
Returns
The result of the operation.

References makVrl.Quaterniond.Quaterniond(), makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

static void makVrl.Quaterniond.Sub ( ref Quaterniond  left,
ref Quaterniond  right,
out Quaterniond  result 
)
inlinestatic

Subtracts two instances.

Parameters
leftThe left instance.
rightThe right instance.
resultThe result of the operation.

References makVrl.Quaterniond.Quaterniond().

void makVrl.Quaterniond.ToAxisAngle ( out Vector3d  axis,
out double  angle 
)
inline

Convert the current quaternion to axis angle representation

Parameters
axisThe resultant axis
angleThe resultant angle

References makVrl.Quaterniond.ToAxisAngle().

void makVrl.Quaterniond.ToAxisAngle ( out Vector3f  axis,
out double  angle 
)
inline

Convert the current quaternion to axis angle representation

Parameters
axisThe resultant axis
angleThe resultant angle

References makVrl.Quaterniond.ToAxisAngle(), makVrl.Vector4d.W, makVrl.Vector3d.X, and makVrl.Vector3d.Z.

Vector4d makVrl.Quaterniond.ToAxisAngle ( )
inline

Convert this instance to an axis-angle representation.

Returns
A Vector4 that is the axis-angle representation of this quaternion.

References makVrl.Quaterniond.Normalize(), makVrl.Vector3d.UnitX, and makVrl.Quaterniond.W.

Referenced by makVrl.Quaterniond.ToAxisAngle().

override string makVrl.Quaterniond.ToString ( )
inline

Returns a System.String that represents the current Quaterniond.

Returns

References makVrl.Quaterniond.W, and makVrl.Quaterniond.Xyz.

Member Data Documentation

readonly Quaterniond makVrl.Quaterniond.Identity = new Quaterniond(0, 0, 0, 1)
static

Defines the identity quaternion.

Referenced by makVrl.Quaterniond.FromAxisAngle(), and makVrl.Quaterniond.Slerp().

double makVrl.Quaterniond.w
Vector3d makVrl.Quaterniond.xyz

Property Documentation

double makVrl.Quaterniond.Length
get

Gets the length (magnitude) of the Quaterniond.

See Also
LengthSquared
double makVrl.Quaterniond.LengthSquared
get

Gets the square of the Quaterniond length (magnitude).

Referenced by makVrl.Quaterniond.Slerp().

double makVrl.Quaterniond.W
getset
double makVrl.Quaterniond.X
getset

Gets or sets the X component of this instance.

Referenced by makVrl.Quaterniond.Multiply(), and makVrl.Quaterniond.operator*().

Vector3d makVrl.Quaterniond.XYZ
getset

Gets or sets an makVrl.Vector3d with the X, Y and Z components of this instance.

Vector3d makVrl.Quaterniond.Xyz
getset
double makVrl.Quaterniond.Y
getset

Gets or sets the Y component of this instance.

Referenced by makVrl.Quaterniond.Multiply(), and makVrl.Quaterniond.operator*().

double makVrl.Quaterniond.Z
getset

Gets or sets the Z component of this instance.

Referenced by makVrl.Quaterniond.Multiply(), and makVrl.Quaterniond.operator*().


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

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)