|
Nebula
|
An efficient mathematical representation for three dimensional rotations.
Inherits IEquatable.
Public Member Functions | |
| Quaternion (float x, float y, float z, float w) | |
| Constructs a quaternion with X, Y, Z and W from four values. | |
| Quaternion (Vector3 value, float w) | |
| Constructs a quaternion with X, Y, Z from Vector3 and rotation component from a scalar. | |
| Quaternion (Vector4 value) | |
| Constructs a quaternion from Vector4. | |
| void | Conjugate () |
| Transforms this quaternion into its conjugated version. | |
| override bool | Equals (object obj) |
| Compares whether current instance is equal to specified Object. | |
| bool | Equals (Quaternion other) |
| Compares whether current instance is equal to specified Quaternion. | |
| override int | GetHashCode () |
| Gets the hash code of this Quaternion. | |
| float | Length () |
| Returns the magnitude of the quaternion components. | |
| float | LengthSquared () |
| Returns the squared magnitude of the quaternion components. | |
| void | Normalize () |
| Scales the quaternion magnitude to unit length. | |
| override string | ToString () |
| Returns a String representation of this Quaternion in the format: {X:[X] Y:[Y] Z:[Z] W:[W]}. | |
| Vector4 | ToVector4 () |
| Gets a Vector4 representation for this object. | |
| void | Deconstruct (out float x, out float y, out float z, out float w) |
Static Public Member Functions | |
| static Quaternion | Add (Quaternion quaternion1, Quaternion quaternion2) |
| Creates a new Quaternion that contains the sum of two quaternions. | |
| static void | Add (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) |
| Creates a new Quaternion that contains the sum of two quaternions. | |
| static Quaternion | Concatenate (Quaternion value1, Quaternion value2) |
| Creates a new Quaternion that contains concatenation between two quaternion. | |
| static void | Concatenate (ref Quaternion value1, ref Quaternion value2, out Quaternion result) |
| Creates a new Quaternion that contains concatenation between two quaternion. | |
| static Quaternion | Conjugate (Quaternion value) |
| Creates a new Quaternion that contains conjugated version of the specified quaternion. | |
| static void | Conjugate (ref Quaternion value, out Quaternion result) |
| Creates a new Quaternion that contains conjugated version of the specified quaternion. | |
| static Quaternion | CreateFromAxisAngle (Vector3 axis, float angle) |
| Creates a new Quaternion from the specified axis and angle. | |
| static void | CreateFromAxisAngle (ref Vector3 axis, float angle, out Quaternion result) |
| Creates a new Quaternion from the specified axis and angle. | |
| static Quaternion | CreateFromRotationMatrix (Matrix matrix) |
| Creates a new Quaternion from the specified Matrix. | |
| static void | CreateFromRotationMatrix (ref Matrix matrix, out Quaternion result) |
| Creates a new Quaternion from the specified Matrix. | |
| static Quaternion | CreateFromYawPitchRoll (float yaw, float pitch, float roll) |
| Creates a new Quaternion from the specified yaw, pitch and roll angles. | |
| static void | CreateFromYawPitchRoll (float yaw, float pitch, float roll, out Quaternion result) |
| Creates a new Quaternion from the specified yaw, pitch and roll angles. | |
| static Quaternion | Divide (Quaternion quaternion1, Quaternion quaternion2) |
| Divides a Quaternion by the other Quaternion. | |
| static void | Divide (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) |
| Divides a Quaternion by the other Quaternion. | |
| static float | Dot (Quaternion quaternion1, Quaternion quaternion2) |
| Returns a dot product of two quaternions. | |
| static void | Dot (ref Quaternion quaternion1, ref Quaternion quaternion2, out float result) |
| Returns a dot product of two quaternions. | |
| static Quaternion | Inverse (Quaternion quaternion) |
| Returns the inverse quaternion which represents the opposite rotation. | |
| static void | Inverse (ref Quaternion quaternion, out Quaternion result) |
| Returns the inverse quaternion which represents the opposite rotation. | |
| static Quaternion | Lerp (Quaternion quaternion1, Quaternion quaternion2, float amount) |
| Performs a linear blend between two quaternions. | |
| static void | Lerp (ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result) |
| Performs a linear blend between two quaternions. | |
| static Quaternion | Slerp (Quaternion quaternion1, Quaternion quaternion2, float amount) |
| Performs a spherical linear blend between two quaternions. | |
| static void | Slerp (ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result) |
| Performs a spherical linear blend between two quaternions. | |
| static Quaternion | Subtract (Quaternion quaternion1, Quaternion quaternion2) |
| Creates a new Quaternion that contains subtraction of one Quaternion from another. | |
| static void | Subtract (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) |
| Creates a new Quaternion that contains subtraction of one Quaternion from another. | |
| static Quaternion | Multiply (Quaternion quaternion1, Quaternion quaternion2) |
| Creates a new Quaternion that contains a multiplication of two quaternions. | |
| static Quaternion | Multiply (Quaternion quaternion1, float scaleFactor) |
| Creates a new Quaternion that contains a multiplication of Quaternion and a scalar. | |
| static void | Multiply (ref Quaternion quaternion1, float scaleFactor, out Quaternion result) |
| Creates a new Quaternion that contains a multiplication of Quaternion and a scalar. | |
| static void | Multiply (ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) |
| Creates a new Quaternion that contains a multiplication of two quaternions. | |
| static Quaternion | Negate (Quaternion quaternion) |
| Flips the sign of the all the quaternion components. | |
| static void | Negate (ref Quaternion quaternion, out Quaternion result) |
| Flips the sign of the all the quaternion components. | |
| static Quaternion | Normalize (Quaternion quaternion) |
| Scales the quaternion magnitude to unit length. | |
| static void | Normalize (ref Quaternion quaternion, out Quaternion result) |
| Scales the quaternion magnitude to unit length. | |
| static Quaternion | operator+ (Quaternion quaternion1, Quaternion quaternion2) |
| Adds two quaternions. | |
| static Quaternion | operator/ (Quaternion quaternion1, Quaternion quaternion2) |
| Divides a Quaternion by the other Quaternion. | |
| static bool | operator== (Quaternion quaternion1, Quaternion quaternion2) |
| Compares whether two Quaternion instances are equal. | |
| static bool | operator!= (Quaternion quaternion1, Quaternion quaternion2) |
| Compares whether two Quaternion instances are not equal. | |
| static Quaternion | operator* (Quaternion quaternion1, Quaternion quaternion2) |
| Multiplies two quaternions. | |
| static Quaternion | operator* (Quaternion quaternion1, float scaleFactor) |
| Multiplies the components of quaternion by a scalar. | |
| static Quaternion | operator- (Quaternion quaternion1, Quaternion quaternion2) |
| Subtracts a Quaternion from a Quaternion. | |
| static Quaternion | operator- (Quaternion quaternion) |
| Flips the sign of the all the quaternion components. | |
Public Attributes | |
| float | X |
| The x coordinate of this Quaternion. | |
| float | Y |
| The y coordinate of this Quaternion. | |
| float | Z |
| The z coordinate of this Quaternion. | |
| float | W |
| The rotation component of this Quaternion. | |
Properties | |
| static Quaternion | Identity [get] |
| Returns a quaternion representing no rotation. | |
| string | DebugDisplayString [get] |
Static Private Attributes | |
| static readonly Quaternion | _identity = new Quaternion(0, 0, 0, 1) |
|
inline |
Constructs a quaternion with X, Y, Z and W from four values.
| x | The x coordinate in 3d-space. |
| y | The y coordinate in 3d-space. |
| z | The z coordinate in 3d-space. |
| w | The rotation component. |
|
inline |
Constructs a quaternion with X, Y, Z from Vector3 and rotation component from a scalar.
| value | The x, y, z coordinates in 3d-space. |
| w | The rotation component. |
|
inline |
Constructs a quaternion from Vector4.
| value | The x, y, z coordinates in 3d-space and the rotation component. |
|
inlinestatic |
Creates a new Quaternion that contains the sum of two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
|
inlinestatic |
Creates a new Quaternion that contains the sum of two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| result | The result of the quaternion addition as an output parameter. |
|
inlinestatic |
Creates a new Quaternion that contains concatenation between two quaternion.
| value1 | The first Quaternion to concatenate. |
| value2 | The second Quaternion to concatenate. |
|
inlinestatic |
Creates a new Quaternion that contains concatenation between two quaternion.
| value1 | The first Quaternion to concatenate. |
| value2 | The second Quaternion to concatenate. |
| result | The result of rotation of value1 followed by value2 rotation as an output parameter. |
|
inline |
Transforms this quaternion into its conjugated version.
|
inlinestatic |
Creates a new Quaternion that contains conjugated version of the specified quaternion.
| value | The quaternion which values will be used to create the conjugated version. |
|
inlinestatic |
Creates a new Quaternion that contains conjugated version of the specified quaternion.
| value | The quaternion which values will be used to create the conjugated version. |
| result | The conjugated version of the specified quaternion as an output parameter. |
|
inlinestatic |
Creates a new Quaternion from the specified axis and angle.
| axis | The axis of rotation. |
| angle | The angle in radians. |
| result | The new quaternion builded from axis and angle as an output parameter. |
|
inlinestatic |
Creates a new Quaternion from the specified axis and angle.
| axis | The axis of rotation. |
| angle | The angle in radians. |
|
inlinestatic |
Creates a new Quaternion from the specified Matrix.
| matrix | The rotation matrix. |
|
inlinestatic |
Creates a new Quaternion from the specified Matrix.
| matrix | The rotation matrix. |
| result | A quaternion composed from the rotation part of the matrix as an output parameter. |
|
inlinestatic |
Creates a new Quaternion from the specified yaw, pitch and roll angles.
| yaw | Yaw around the y axis in radians. |
| pitch | Pitch around the x axis in radians. |
| roll | Roll around the z axis in radians. |
|
inlinestatic |
Creates a new Quaternion from the specified yaw, pitch and roll angles.
| yaw | Yaw around the y axis in radians. |
| pitch | Pitch around the x axis in radians. |
| roll | Roll around the z axis in radians. |
| result | A new quaternion from the concatenated yaw, pitch, and roll angles as an output parameter. |
|
inline |
|
inlinestatic |
Divides a Quaternion by the other Quaternion.
| quaternion1 | Source Quaternion. |
| quaternion2 | Divisor Quaternion. |
|
inlinestatic |
Divides a Quaternion by the other Quaternion.
| quaternion1 | Source Quaternion. |
| quaternion2 | Divisor Quaternion. |
| result | The result of dividing the quaternions as an output parameter. |
|
inlinestatic |
Returns a dot product of two quaternions.
| quaternion1 | The first quaternion. |
| quaternion2 | The second quaternion. |
|
inlinestatic |
Returns a dot product of two quaternions.
| quaternion1 | The first quaternion. |
| quaternion2 | The second quaternion. |
| result | The dot product of two quaternions as an output parameter. |
|
inline |
Compares whether current instance is equal to specified Object.
| obj | The Object to compare. |
true if the instances are equal; false otherwise.
|
inline |
Compares whether current instance is equal to specified Quaternion.
| other | The Quaternion to compare. |
true if the instances are equal; false otherwise.
|
inline |
Gets the hash code of this Quaternion.
|
inlinestatic |
Returns the inverse quaternion which represents the opposite rotation.
| quaternion | Source Quaternion. |
|
inlinestatic |
Returns the inverse quaternion which represents the opposite rotation.
| quaternion | Source Quaternion. |
| result | The inverse quaternion as an output parameter. |
|
inline |
Returns the magnitude of the quaternion components.
|
inline |
Returns the squared magnitude of the quaternion components.
|
inlinestatic |
Performs a linear blend between two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| amount | The blend amount where 0 returns quaternion1 and 1 quaternion2 . |
|
inlinestatic |
Performs a linear blend between two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| amount | The blend amount where 0 returns quaternion1 and 1 quaternion2 . |
| result | The result of linear blending between two quaternions as an output parameter. |
|
inlinestatic |
Creates a new Quaternion that contains a multiplication of Quaternion and a scalar.
| quaternion1 | Source Quaternion. |
| scaleFactor | Scalar value. |
|
inlinestatic |
Creates a new Quaternion that contains a multiplication of two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
|
inlinestatic |
Creates a new Quaternion that contains a multiplication of Quaternion and a scalar.
| quaternion1 | Source Quaternion. |
| scaleFactor | Scalar value. |
| result | The result of the quaternion multiplication with a scalar as an output parameter. |
|
inlinestatic |
Creates a new Quaternion that contains a multiplication of two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| result | The result of the quaternion multiplication as an output parameter. |
|
inlinestatic |
Flips the sign of the all the quaternion components.
| quaternion | Source Quaternion. |
|
inlinestatic |
Flips the sign of the all the quaternion components.
| quaternion | Source Quaternion. |
| result | The result of the quaternion negation as an output parameter. |
|
inline |
Scales the quaternion magnitude to unit length.
|
inlinestatic |
Scales the quaternion magnitude to unit length.
| quaternion | Source Quaternion. |
|
inlinestatic |
Scales the quaternion magnitude to unit length.
| quaternion | Source Quaternion. |
| result | The unit length quaternion an output parameter. |
|
inlinestatic |
Compares whether two Quaternion instances are not equal.
| quaternion1 | Quaternion instance on the left of the not equal sign. |
| quaternion2 | Quaternion instance on the right of the not equal sign. |
true if the instances are not equal; false otherwise.
|
inlinestatic |
Multiplies the components of quaternion by a scalar.
| quaternion1 | Source Vector3 on the left of the mul sign. |
| scaleFactor | Scalar value on the right of the mul sign. |
|
inlinestatic |
Multiplies two quaternions.
| quaternion1 | Source Quaternion on the left of the mul sign. |
| quaternion2 | Source Quaternion on the right of the mul sign. |
|
inlinestatic |
Adds two quaternions.
| quaternion1 | Source Quaternion on the left of the add sign. |
| quaternion2 | Source Quaternion on the right of the add sign. |
|
inlinestatic |
Flips the sign of the all the quaternion components.
| quaternion | Source Quaternion on the right of the sub sign. |
|
inlinestatic |
Subtracts a Quaternion from a Quaternion.
| quaternion1 | Source Vector3 on the left of the sub sign. |
| quaternion2 | Source Vector3 on the right of the sub sign. |
|
inlinestatic |
Divides a Quaternion by the other Quaternion.
| quaternion1 | Source Quaternion on the left of the div sign. |
| quaternion2 | Divisor Quaternion on the right of the div sign. |
|
inlinestatic |
Compares whether two Quaternion instances are equal.
| quaternion1 | Quaternion instance on the left of the equal sign. |
| quaternion2 | Quaternion instance on the right of the equal sign. |
true if the instances are equal; false otherwise.
|
inlinestatic |
Performs a spherical linear blend between two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| amount | The blend amount where 0 returns quaternion1 and 1 quaternion2 . |
|
inlinestatic |
Performs a spherical linear blend between two quaternions.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| amount | The blend amount where 0 returns quaternion1 and 1 quaternion2 . |
| result | The result of spherical linear blending between two quaternions as an output parameter. |
|
inlinestatic |
Creates a new Quaternion that contains subtraction of one Quaternion from another.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
|
inlinestatic |
Creates a new Quaternion that contains subtraction of one Quaternion from another.
| quaternion1 | Source Quaternion. |
| quaternion2 | Source Quaternion. |
| result | The result of the quaternion subtraction as an output parameter. |
|
inline |
Returns a String representation of this Quaternion in the format: {X:[X] Y:[Y] Z:[Z] W:[W]}.
|
inline |
|
staticprivate |
| float Mathf.Quaternion.W |
The rotation component of this Quaternion.
| float Mathf.Quaternion.X |
The x coordinate of this Quaternion.
| float Mathf.Quaternion.Y |
The y coordinate of this Quaternion.
| float Mathf.Quaternion.Z |
The z coordinate of this Quaternion.
|
getpackage |
|
staticget |
Returns a quaternion representing no rotation.