![]() |
VR-Link C# API Documentation
|
Represents a Quaternion. More...
Inheritance diagram for makVrl.Quaternion:
Collaboration diagram for makVrl.Quaternion:Public Member Functions | |
| Quaternion (Vector3f v, float w) | |
| Construct a new Quaternion from vector and w components | |
| Quaternion (float x, float y, float z, float w) | |
| Construct a new Quaternion | |
| void | ToAxisAngle (out Vector3f axis, out float angle) |
| Convert the current quaternion to axis angle representation | |
| Vector4 | ToAxisAngle () |
| Convert this instance to an axis-angle representation. | |
| Quaternion | Normalized () |
| Returns a copy of the Quaternion scaled to unit length. | |
| void | Invert () |
| Reverses the rotation angle of this Quaterniond. | |
| Quaternion | Inverted () |
| Returns a copy of this Quaterniond with its rotation angle reversed. | |
| void | Normalize () |
| Scales the Quaternion to unit length. | |
| void | Conjugate () |
| Inverts the Vector3 component of this Quaternion. | |
| override string | ToString () |
| Returns a System.String that represents the current Quaternion. | |
| override bool | Equals (object other) |
| Compares this object instance to another object for equality. | |
| override int | GetHashCode () |
| Provides the hash code for this object. | |
| bool | Equals (Quaternion other) |
| Compares this Quaternion instance to another Quaternion for equality. | |
Static Public Member Functions | |
| static Quaternion | Add (Quaternion left, Quaternion right) |
| Add two quaternions | |
| static void | Add (ref Quaternion left, ref Quaternion right, out Quaternion result) |
| Add two quaternions | |
| static Quaternion | Sub (Quaternion left, Quaternion right) |
| Subtracts two instances. | |
| static void | Sub (ref Quaternion left, ref Quaternion right, out Quaternion result) |
| Subtracts two instances. | |
| static Quaternion | Mult (Quaternion left, Quaternion right) |
| Multiplies two instances. | |
| static void | Mult (ref Quaternion left, ref Quaternion right, out Quaternion result) |
| Multiplies two instances. | |
| static Quaternion | Multiply (Quaternion left, Quaternion right) |
| Multiplies two instances. | |
| static void | Multiply (ref Quaternion left, ref Quaternion right, out Quaternion result) |
| Multiplies two instances. | |
| static void | Multiply (ref Quaternion quaternion, float scale, out Quaternion result) |
| Multiplies an instance by a scalar. | |
| static Quaternion | Multiply (Quaternion quaternion, float scale) |
| Multiplies an instance by a scalar. | |
| static Quaternion | Conjugate (Quaternion q) |
| Get the conjugate of the given quaternion | |
| static void | Conjugate (ref Quaternion q, out Quaternion result) |
| Get the conjugate of the given quaternion | |
| static Quaternion | Invert (Quaternion q) |
| Get the inverse of the given quaternion | |
| static void | Invert (ref Quaternion q, out Quaternion result) |
| Get the inverse of the given quaternion | |
| static Quaternion | Normalize (Quaternion q) |
| Scale the given quaternion to unit length | |
| static void | Normalize (ref Quaternion q, out Quaternion result) |
| Scale the given quaternion to unit length | |
| static Quaternion | FromAxisAngle (Vector3f axis, float angle) |
| Build a quaternion from the given axis and angle | |
| static Quaternion | FromMatrix (Matrix3 matrix) |
| Builds a quaternion from the given rotation matrix | |
| static void | FromMatrix (ref Matrix3 matrix, out Quaternion result) |
| Builds a quaternion from the given rotation matrix | |
| static Quaternion | Slerp (Quaternion q1, Quaternion q2, float blend) |
| Do Spherical linear interpolation between two quaternions | |
| static Quaternion | operator+ (Quaternion left, Quaternion right) |
| Adds two instances. | |
| static Quaternion | operator- (Quaternion left, Quaternion right) |
| Subtracts two instances. | |
| static Quaternion | operator* (Quaternion left, Quaternion right) |
| Multiplies two instances. | |
| static Quaternion | operator* (Quaternion quaternion, float scale) |
| Multiplies an instance by a scalar. | |
| static Quaternion | operator* (float scale, Quaternion quaternion) |
| Multiplies an instance by a scalar. | |
| static bool | operator== (Quaternion left, Quaternion right) |
| Compares two instances for equality. | |
| static bool | operator!= (Quaternion left, Quaternion right) |
| Compares two instances for inequality. | |
Public Attributes | |
| Vector3f | xyz |
| float | w |
Static Public Attributes | |
| static readonly Quaternion | Identity = new Quaternion(0, 0, 0, 1) |
| Defines the identity quaternion. | |
Properties | |
| Vector3f | XYZ [get, set] |
| Gets or sets an makVrl.Vector3 with the X, Y and Z components of this instance. | |
| Vector3f | Xyz [get, set] |
| Gets or sets an makVrl.Vector3 with the X, Y and Z components of this instance. | |
| float | X [get, set] |
| Gets or sets the X component of this instance. | |
| float | Y [get, set] |
| Gets or sets the Y component of this instance. | |
| float | Z [get, set] |
| Gets or sets the Z component of this instance. | |
| float | W [get, set] |
| Gets or sets the W component of this instance. | |
| float | Length [get] |
| Gets the length (magnitude) of the quaternion. | |
| float | LengthSquared [get] |
| Gets the square of the quaternion length (magnitude). | |
Represents a Quaternion.
|
inline |
Construct a new Quaternion from vector and w components
| v | The vector part |
| w | The w part |
References makVrl.Quaternion.w, and makVrl.Quaternion.xyz.
Referenced by makVrl.Quaternion.Add(), makVrl.Quaternion.Conjugate(), makVrl.Quaternion.Equals(), makVrl.Quaternion.Invert(), makVrl.Quaternion.Mult(), makVrl.Quaternion.Multiply(), makVrl.Quaternion.Normalize(), makVrl.Quaternion.operator*(), makVrl.Quaternion.Slerp(), and makVrl.Quaternion.Sub().
|
inline |
Construct a new Quaternion
| x | The x component |
| y | The y component |
| z | The z component |
| w | The w component |
|
inlinestatic |
Add two quaternions
| left | The first operand |
| right | The second operand |
References makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Add two quaternions
| left | The first operand |
| right | The second operand |
| result | The result of the addition |
References makVrl.Quaternion.Quaternion().
|
inline |
Inverts the Vector3 component of this Quaternion.
References makVrl.Quaternion.Xyz.
|
inlinestatic |
Get the conjugate of the given quaternion
| q | The quaternion |
References makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Get the conjugate of the given quaternion
| q | The quaternion |
| result | The conjugate of the given quaternion |
References makVrl.Quaternion.Quaternion().
|
inline |
Compares this object instance to another object for equality.
| other | The other object to be used in the comparison. |
References makVrl.Quaternion.Quaternion().
Referenced by makVrl.Quaternion.operator!=(), and makVrl.Quaternion.operator==().
|
inline |
Compares this Quaternion instance to another Quaternion for equality.
| other | The other Quaternion to be used in the comparison. |
References makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Build a quaternion from the given axis and angle
| axis | The axis to rotate about |
| angle | The rotation angle in radians |
References makVrl.Quaternion.Identity, makVrl.Vector3f.LengthSquared, makVrl.Quaternion.Normalize(), makVrl.Vector3f.Normalize(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Builds a quaternion from the given rotation matrix
| matrix | A rotation matrix |
|
inlinestatic |
Builds a quaternion from the given rotation matrix
| matrix | A rotation matrix |
| result | The equivalent quaternion |
References makVrl.Quaternion.w.
|
inline |
Provides the hash code for this object.
References makVrl.Vector3f.GetHashCode(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inline |
Reverses the rotation angle of this Quaterniond.
References makVrl.Quaternion.W.
Referenced by makVrl.Quaternion.Invert(), makVrl.Quaternion.Inverted(), makVrl.Vector2.Transform(), and makVrl.Vector4.Transform().
|
inlinestatic |
Get the inverse of the given quaternion
| q | The quaternion to invert |
References makVrl.Quaternion.Invert().
|
inlinestatic |
Get the inverse of the given quaternion
| q | The quaternion to invert |
| result | The inverse of the given quaternion |
References makVrl.Quaternion.Quaternion().
|
inline |
Returns a copy of this Quaterniond with its rotation angle reversed.
References makVrl.Quaternion.Invert().
|
inlinestatic |
Multiplies two instances.
| left | The first instance. |
| right | The second instance. |
References makVrl.Vector3f.Cross(), makVrl.Vector3f.Dot(), makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Multiplies two instances.
| left | The first instance. |
| right | The second instance. |
| result | A new instance containing the result of the calculation. |
References makVrl.Vector3f.Cross(), makVrl.Vector3f.Dot(), and makVrl.Quaternion.Quaternion().
|
inlinestatic |
Multiplies two instances.
| left | The first instance. |
| right | The second instance. |
Referenced by makVrl.Quaternion.operator*(), makVrl.Vector2.Transform(), and makVrl.Vector4.Transform().
|
inlinestatic |
Multiplies two instances.
| left | The first instance. |
| right | The second instance. |
| result | A new instance containing the result of the calculation. |
References makVrl.Vector3f.Cross(), makVrl.Vector3f.Dot(), and makVrl.Quaternion.Quaternion().
|
inlinestatic |
Multiplies an instance by a scalar.
| quaternion | The instance. |
| scale | The scalar. |
| result | A new instance containing the result of the calculation. |
References makVrl.Quaternion.Quaternion().
|
inlinestatic |
Multiplies an instance by a scalar.
| quaternion | The instance. |
| scale | The scalar. |
References makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, makVrl.Quaternion.X, makVrl.Quaternion.Y, and makVrl.Quaternion.Z.
|
inline |
Scales the Quaternion to unit length.
References makVrl.Quaternion.Length, makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
Referenced by makVrl.Matrix3.ExtractRotation(), makVrl.Matrix4.ExtractRotation(), makVrl.Quaternion.FromAxisAngle(), makVrl.Quaternion.Normalize(), makVrl.Quaternion.Normalized(), makVrl.Quaternion.Slerp(), and makVrl.Quaternion.ToAxisAngle().
|
inlinestatic |
Scale the given quaternion to unit length
| q | The quaternion to normalize |
References makVrl.Quaternion.Normalize().
|
inlinestatic |
Scale the given quaternion to unit length
| q | The quaternion to normalize |
| result | The normalized quaternion |
References makVrl.Quaternion.Quaternion().
|
inline |
Returns a copy of the Quaternion scaled to unit length.
References makVrl.Quaternion.Normalize().
|
inlinestatic |
Compares two instances for inequality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Quaternion.Equals().
|
inlinestatic |
Multiplies two instances.
| left | The first instance. |
| right | The second instance. |
References makVrl.Quaternion.Multiply().
|
inlinestatic |
Multiplies an instance by a scalar.
| quaternion | The instance. |
| scale | The scalar. |
References makVrl.Quaternion.Multiply().
|
inlinestatic |
Multiplies an instance by a scalar.
| quaternion | The instance. |
| scale | The scalar. |
References makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, makVrl.Quaternion.X, makVrl.Quaternion.Y, and makVrl.Quaternion.Z.
|
inlinestatic |
Adds two instances.
| left | The first instance. |
| right | The second instance. |
References makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Subtracts two instances.
| left | The first instance. |
| right | The second instance. |
References makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Compares two instances for equality.
| left | The first instance. |
| right | The second instance. |
References makVrl.Quaternion.Equals().
|
inlinestatic |
Do Spherical linear interpolation between two quaternions
| q1 | The first quaternion |
| q2 | The second quaternion |
| blend | The blend factor |
References makVrl.Vector3f.Dot(), makVrl.Quaternion.Identity, makVrl.Quaternion.LengthSquared, makVrl.Quaternion.Normalize(), makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Subtracts two instances.
| left | The left instance. |
| right | The right instance. |
References makVrl.Quaternion.Quaternion(), makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
inlinestatic |
Subtracts two instances.
| left | The left instance. |
| right | The right instance. |
| result | The result of the operation. |
References makVrl.Quaternion.Quaternion().
|
inline |
Convert the current quaternion to axis angle representation
| axis | The resultant axis |
| angle | The resultant angle |
References makVrl.Quaternion.ToAxisAngle(), makVrl.Vector4.W, and makVrl.Vector4.Xyz.
|
inline |
Convert this instance to an axis-angle representation.
References makVrl.Quaternion.Normalize(), makVrl.Vector3f.UnitX, makVrl.Vector4.W, makVrl.Quaternion.W, makVrl.Quaternion.Xyz, and makVrl.Vector4.Xyz.
Referenced by makVrl.Quaternion.ToAxisAngle().
|
inline |
Returns a System.String that represents the current Quaternion.
References makVrl.Quaternion.W, and makVrl.Quaternion.Xyz.
|
static |
Defines the identity quaternion.
Referenced by makVrl.Quaternion.FromAxisAngle(), and makVrl.Quaternion.Slerp().
| float makVrl.Quaternion.w |
Referenced by makVrl.Quaternion.FromMatrix(), and makVrl.Quaternion.Quaternion().
| Vector3f makVrl.Quaternion.xyz |
Referenced by makVrl.Quaternion.Quaternion().
|
get |
Gets the length (magnitude) of the quaternion.
Referenced by makVrl.Quaternion.Normalize().
|
get |
Gets the square of the quaternion length (magnitude).
Referenced by makVrl.Quaternion.Slerp().
|
getset |
Gets or sets the W component of this instance.
Referenced by makVrl.Quaternion.Add(), makVrl.Quaternion.Conjugate(), makVrl.Quaternion.Equals(), makVrl.Matrix3.ExtractRotation(), makVrl.Matrix4.ExtractRotation(), makVrl.Quaternion.FromAxisAngle(), makVrl.Quaternion.GetHashCode(), makVrl.Quaternion.Invert(), makVrl.Quaternion.Mult(), makVrl.Quaternion.Multiply(), makVrl.Quaternion.Normalize(), makVrl.Quaternion.operator*(), makVrl.Quaternion.operator+(), makVrl.Quaternion.operator-(), makVrl.Quaternion.Slerp(), makVrl.Quaternion.Sub(), makVrl.Quaternion.ToAxisAngle(), and makVrl.Quaternion.ToString().
|
getset |
Gets or sets the X component of this instance.
Referenced by makVrl.Matrix3.ExtractRotation(), makVrl.Matrix4.ExtractRotation(), makVrl.Quaternion.Multiply(), and makVrl.Quaternion.operator*().
|
getset |
Gets or sets an makVrl.Vector3 with the X, Y and Z components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the X, Y and Z components of this instance.
Referenced by makVrl.Quaternion.Add(), makVrl.Quaternion.Conjugate(), makVrl.Quaternion.Equals(), makVrl.Quaternion.FromAxisAngle(), makVrl.Quaternion.GetHashCode(), makVrl.Quaternion.Mult(), makVrl.Quaternion.Normalize(), makVrl.Quaternion.operator+(), makVrl.Quaternion.operator-(), makVrl.Quaternion.Slerp(), makVrl.Quaternion.Sub(), makVrl.Quaternion.ToAxisAngle(), and makVrl.Quaternion.ToString().
|
getset |
Gets or sets the Y component of this instance.
Referenced by makVrl.Matrix3.ExtractRotation(), makVrl.Matrix4.ExtractRotation(), makVrl.Quaternion.Multiply(), and makVrl.Quaternion.operator*().
|
getset |
Gets or sets the Z component of this instance.
Referenced by makVrl.Matrix3.ExtractRotation(), makVrl.Matrix4.ExtractRotation(), makVrl.Quaternion.Multiply(), and makVrl.Quaternion.operator*().