Struct Quaternion
Implements
Inherited Members
Namespace: GTA.Math
Assembly: ScriptHookVDotNet2.dll
Syntax
[Serializable]
public struct Quaternion : IEquatable<Quaternion>
Constructors
| Name | Description |
|---|---|
| Quaternion(Vector3, Single) | Initializes a new instance of the Quaternion structure. |
| Quaternion(Single, Single, Single, Single) | Initializes a new instance of the Quaternion structure. |
Fields
| Name | Description |
|---|---|
| W | Gets or sets the W component of the quaternion. |
| X | Gets or sets the X component of the quaternion. |
| Y | Gets or sets the Y component of the quaternion. |
| Z | Gets or sets the Z component of the quaternion. |
Properties
| Name | Description |
|---|---|
| Angle | Gets the angle of the quaternion. |
| Axis | Gets the axis components of the quaternion. |
| Identity | The identity Quaternion (0, 0, 0, 1). |
Methods
| Name | Description |
|---|---|
| Add(Quaternion, Quaternion) | Adds two quaternions. |
| AngleBetween(Quaternion, Quaternion) | Returns the angle in degrees between two rotations a and b. |
| Conjugate() | Conjugates the quaternion. |
| Conjugate(Quaternion) | Creates the conjugate of a specified Quaternion. |
| Divide(Quaternion, Quaternion) | Divides a quaternion by another. |
| Dot(Quaternion, Quaternion) | Calculates the dot product of two quaternions. |
| Equals(Quaternion) | Returns a value that indicates whether the current instance is equal to the specified object. |
| Equals(ref Quaternion, ref Quaternion) | Determines whether the specified object instances are considered equal. |
| Equals(Object) | Returns a value that indicates whether the current instance is equal to a specified object. |
| Euler(Vector3) | Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis (in that order). |
| Euler(Single, Single, Single) | Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis (in that order). |
| FromToRotation(Vector3, Vector3) | Creates a rotation which rotates from fromDirection to toDirection. |
| GetHashCode() | Returns the hash code for this instance. |
| Invert() | Conjugates and renormalizes the quaternion. |
| Invert(Quaternion) | Conjugates and renormalizes the quaternion. |
| Length() | Calculates the length of the quaternion. |
| LengthSquared() | Calculates the squared length of the quaternion. |
| Lerp(Quaternion, Quaternion, Single) | Performs a linear interpolation between two quaternion. |
| Multiply(Quaternion, Quaternion) | Modulates a quaternion by another. |
| Multiply(Quaternion, Single) | Scales a quaternion by the given value. |
| Negate(Quaternion) | Reverses the direction of a given quaternion. |
| Normalize() | Converts the quaternion into a unit quaternion. |
| Normalize(Quaternion) | Converts the quaternion into a unit quaternion. |
| RotateTowards(Quaternion, Quaternion, Single) | Rotates a rotation from towards to. |
| RotationAxis(Vector3, Single) | Creates a quaternion given a rotation and an axis. |
| RotationMatrix(Matrix) | Creates a quaternion given a rotation matrix. |
| RotationYawPitchRoll(Single, Single, Single) | Creates a Quaternion from the given yaw, pitch, and roll, in radians. |
| Slerp(Quaternion, Quaternion, Single) | Interpolates between two quaternions, using spherical linear interpolation.. |
| SlerpUnclamped(Quaternion, Quaternion, Single) | Interpolates between two quaternions, using spherical linear interpolation. The parameter /t/ is not clamped. |
| Subtract(Quaternion, Quaternion) | Subtracts two quaternions. |
| ToString() | Converts the value of the object to its equivalent string representation. |
| ToString(String) | Converts the value of the object to its equivalent string representation. |
Operators
| Name | Description |
|---|---|
| Addition(Quaternion, Quaternion) | Adds two quaternions. |
| Division(Quaternion, Quaternion) | Divides a Quaternion by another Quaternion. |
| Equality(Quaternion, Quaternion) | Tests for equality between two objects. |
| Inequality(Quaternion, Quaternion) | Tests for inequality between two objects. |
| Multiply(Quaternion, Quaternion) | Multiplies a quaternion by another. |
| Multiply(Quaternion, Vector3) | Rotates a point using a quaternion. |
| Multiply(Quaternion, Single) | Scales a quaternion by the given value. |
| Multiply(Single, Quaternion) | Scales a quaternion by the given value. |
| Subtraction(Quaternion, Quaternion) | Subtracts two quaternions. |
| UnaryNegation(Quaternion) | Reverses the direction of a given quaternion. |