The Open Toolkit library
1.0
|
Represents a double-precision Quaternion. More...
Inherits IEquatable< 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... | |
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 OpenTK.Vector3d with the X, Y and Z components of this instance. More... | |
Vector3d | Xyz [get, set] |
Gets or sets an OpenTK.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... | |
Represents a double-precision Quaternion.
OpenTK.Quaterniond.Quaterniond | ( | Vector3d | v, |
double | w | ||
) |
Construct a new Quaterniond from vector and w components
v | The vector part |
w | The w part |
OpenTK.Quaterniond.Quaterniond | ( | double | x, |
double | y, | ||
double | z, | ||
double | w | ||
) |
Construct a new Quaterniond
x | The x component |
y | The y component |
z | The z component |
w | The w component |
|
static |
Add two quaternions
left | The first operand |
right | The second operand |
|
static |
Add two quaternions
left | The first operand |
right | The second operand |
result | The result of the addition |
void OpenTK.Quaterniond.Conjugate | ( | ) |
Inverts the Vector3d component of this Quaterniond.
|
static |
Get the conjugate of the given Quaterniond
q | The Quaterniond |
|
static |
Get the conjugate of the given Quaterniond
q | The Quaterniond |
result | The conjugate of the given Quaterniond |
override bool OpenTK.Quaterniond.Equals | ( | object | other | ) |
Compares this object instance to another object for equality.
other | The other object to be used in the comparison. |
bool OpenTK.Quaterniond.Equals | ( | Quaterniond | other | ) |
Compares this Quaterniond instance to another Quaterniond for equality.
other | The other Quaterniond to be used in the comparison. |
|
static |
Build a Quaterniond from the given axis and angle
axis | The axis to rotate about |
angle | The rotation angle in radians |
|
static |
Builds a quaternion from the given rotation matrix
matrix | A rotation matrix |
|
static |
Builds a quaternion from the given rotation matrix
matrix | A rotation matrix |
result | The equivalent quaternion |
override int OpenTK.Quaterniond.GetHashCode | ( | ) |
Provides the hash code for this object.
void OpenTK.Quaterniond.Invert | ( | ) |
Reverses the rotation angle of this Quaterniond.
|
static |
Get the inverse of the given Quaterniond
q | The Quaterniond to invert |
|
static |
Get the inverse of the given Quaterniond
q | The Quaterniond to invert |
result | The inverse of the given Quaterniond |
Quaterniond OpenTK.Quaterniond.Inverted | ( | ) |
Returns a copy of this Quaterniond with its rotation angle reversed.
|
static |
Multiplies two instances.
left | The first instance. |
right | The second instance. |
|
static |
Multiplies two instances.
left | The first instance. |
right | The second instance. |
result | A new instance containing the result of the calculation. |
|
static |
Multiplies two instances.
left | The first instance. |
right | The second instance. |
|
static |
Multiplies two instances.
left | The first instance. |
right | The second instance. |
result | A new instance containing the result of the calculation. |
|
static |
Multiplies an instance by a scalar.
quaternion | The instance. |
scale | The scalar. |
result | A new instance containing the result of the calculation. |
|
static |
Multiplies an instance by a scalar.
quaternion | The instance. |
scale | The scalar. |
void OpenTK.Quaterniond.Normalize | ( | ) |
Scales the Quaterniond to unit length.
|
static |
Scale the given Quaterniond to unit length
q | The Quaterniond to normalize |
|
static |
Scale the given Quaterniond to unit length
q | The Quaterniond to normalize |
result | The normalized Quaterniond |
Quaterniond OpenTK.Quaterniond.Normalized | ( | ) |
Returns a copy of the Quaterniond scaled to unit length.
|
static |
Compares two instances for inequality.
left | The first instance. |
right | The second instance. |
|
static |
Multiplies two instances.
left | The first instance. |
right | The second instance. |
|
static |
Multiplies an instance by a scalar.
quaternion | The instance. |
scale | The scalar. |
|
static |
Multiplies an instance by a scalar.
quaternion | The instance. |
scale | The scalar. |
|
static |
Adds two instances.
left | The first instance. |
right | The second instance. |
|
static |
Subtracts two instances.
left | The first instance. |
right | The second instance. |
|
static |
Compares two instances for equality.
left | The first instance. |
right | The second instance. |
|
static |
Do Spherical linear interpolation between two quaternions
q1 | The first Quaterniond |
q2 | The second Quaterniond |
blend | The blend factor |
|
static |
Subtracts two instances.
left | The left instance. |
right | The right instance. |
|
static |
Subtracts two instances.
left | The left instance. |
right | The right instance. |
result | The result of the operation. |
void OpenTK.Quaterniond.ToAxisAngle | ( | out Vector3d | axis, |
out double | angle | ||
) |
Convert the current quaternion to axis angle representation
axis | The resultant axis |
angle | The resultant angle |
Vector4d OpenTK.Quaterniond.ToAxisAngle | ( | ) |
Convert this instance to an axis-angle representation.
override string OpenTK.Quaterniond.ToString | ( | ) |
Returns a System.String that represents the current Quaterniond.
|
static |
Defines the identity quaternion.
|
get |
Gets the length (magnitude) of the Quaterniond.
|
get |
Gets the square of the Quaterniond length (magnitude).
|
getset |
Gets or sets the W component of this instance.
|
getset |
Gets or sets the X component of this instance.
|
getset |
Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
|
getset |
Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
|
getset |
Gets or sets the Y component of this instance.
|
getset |
Gets or sets the Z component of this instance.