SHVDN
v3
An ASI plugin for Grand Theft Auto V, which allows running scripts written in any .NET language in-game. Developed by crosire https://github.com/crosire/scripthookvdotnet/
|
Public Member Functions | |
Quaternion (float x, float y, float z, float w) | |
Initializes a new instance of the Quaternion structure. More... | |
Quaternion (Vector3 axis, float angle) | |
Initializes a new instance of the Quaternion structure. More... | |
float | Length () |
Calculates the length of the quaternion. More... | |
float | LengthSquared () |
Calculates the squared length of the quaternion. More... | |
void | Normalize () |
Converts the quaternion into a unit quaternion. More... | |
void | Conjugate () |
Conjugates the quaternion. More... | |
void | Invert () |
Conjugates and renormalizes the quaternion. More... | |
Vector3 | RotateTransform (Vector3 point) |
Rotates the point with rotation. More... | |
Vector3 | RotateTransform (Vector3 point, Vector3 center) |
Rotates the point with rotation. More... | |
override string | ToString () |
Converts the value of the object to its equivalent string representation. More... | |
string | ToString (string format) |
Converts the value of the object to its equivalent string representation. More... | |
override int | GetHashCode () |
Returns the hash code for this instance. More... | |
override bool | Equals (object obj) |
Returns a value that indicates whether the current instance is equal to a specified object. More... | |
bool | Equals (Quaternion other) |
Returns a value that indicates whether the current instance is equal to the specified object. More... | |
Static Public Member Functions | |
static Quaternion | Negate (Quaternion quaternion) |
Reverses the direction of a given quaternion. More... | |
static Quaternion | Add (Quaternion left, Quaternion right) |
Adds two quaternions. More... | |
static Quaternion | Subtract (Quaternion left, Quaternion right) |
Subtracts two quaternions. More... | |
static Quaternion | Multiply (Quaternion left, Quaternion right) |
Multiplies two Quaternions together. More... | |
static Quaternion | Multiply (Quaternion quaternion, float scale) |
Scales a quaternion by the given value. More... | |
static Quaternion | Divide (Quaternion left, Quaternion right) |
Divides a quaternion by another. More... | |
static Quaternion | Normalize (Quaternion quaternion) |
Converts the quaternion into a unit quaternion. More... | |
static Quaternion | Conjugate (Quaternion value) |
Creates the conjugate of a specified Quaternion. More... | |
static Quaternion | Invert (Quaternion quaternion) |
Conjugates and renormalizes the quaternion. More... | |
static float | Dot (Quaternion left, Quaternion right) |
Calculates the dot product of two quaternions. More... | |
static Quaternion | Lerp (Quaternion start, Quaternion end, float amount) |
Performs a linear interpolation between two quaternion. More... | |
static Quaternion | Slerp (Quaternion start, Quaternion end, float amount) |
Interpolates between two quaternions, using spherical linear interpolation.. More... | |
static Quaternion | SlerpUnclamped (Quaternion a, Quaternion b, float t) |
Interpolates between two quaternions, using spherical linear interpolation. The parameter /t/ is not clamped. More... | |
static Quaternion | FromToRotation (Vector3 fromDirection, Vector3 toDirection) |
Creates a rotation which rotates from fromDirection to toDirection. More... | |
static Quaternion | RotateTowards (Quaternion from, Quaternion to, float maxDegreesDelta) |
Rotates a rotation from towards to. More... | |
static float | AngleBetween (Quaternion a, Quaternion b) |
Returns the angle in degrees between two rotations a and b. More... | |
static Quaternion | Euler (float zaxis, float xaxis, float yaxis) |
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). More... | |
static Quaternion | Euler (Vector3 euler) |
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). More... | |
static Quaternion | RotationAxis (Vector3 axis, float angle) |
Creates a quaternion given a rotation and an axis. More... | |
static Quaternion | RotationMatrix (Matrix matrix) |
Creates a quaternion given a rotation matrix. More... | |
static Quaternion | RotationYawPitchRoll (float yaw, float pitch, float roll) |
Creates a Quaternion from the given yaw, pitch, and roll, in radians. More... | |
static Quaternion | DirectionVectors (Vector3 rightVector, Vector3 forwardVector, Vector3 upVector) |
Creates a Quaternion from the given relative x, y, z axis More... | |
static void | GetDirectionVectors (Quaternion quaternion, out Vector3 rightVector, out Vector3 forwardVector, out Vector3 upVector) |
Get direction vectors from the given quaternion More... | |
static Quaternion | operator- (Quaternion quaternion) |
Reverses the direction of a given quaternion. More... | |
static Quaternion | operator+ (Quaternion left, Quaternion right) |
Adds two quaternions. More... | |
static Quaternion | operator- (Quaternion left, Quaternion right) |
Subtracts two quaternions. More... | |
static Quaternion | operator* (Quaternion left, Quaternion right) |
Multiplies a quaternion by another. More... | |
static Quaternion | operator* (Quaternion quaternion, float scale) |
Scales a quaternion by the given value. More... | |
static Quaternion | operator* (float scale, Quaternion quaternion) |
Scales a quaternion by the given value. More... | |
static Quaternion | operator/ (Quaternion left, Quaternion right) |
Divides a Quaternion by another Quaternion. More... | |
static bool | operator== (Quaternion left, Quaternion right) |
Tests for equality between two objects. More... | |
static bool | operator!= (Quaternion left, Quaternion right) |
Tests for inequality between two objects. More... | |
static Vector3 | operator* (Quaternion rotation, Vector3 point) |
Rotates the point with rotation. More... | |
static Vector3 | RotateTransform (Quaternion rotation, Vector3 point) |
Rotates the point with rotation. More... | |
static Vector3 | RotateTransform (Quaternion rotation, Vector3 point, Vector3 center) |
Rotates the point with rotation. More... | |
Public Attributes | |
float | X |
Gets or sets the X component of the quaternion. More... | |
float | Y |
Gets or sets the Y component of the quaternion. More... | |
float | Z |
Gets or sets the Z component of the quaternion. More... | |
float | W |
Gets or sets the W component of the quaternion. More... | |
float | Angle => ((System.Math.Abs(W) <= 1.0f) ? 2.0f * (float)(System.Math.Acos(W)) : 0.0f) |
Gets the angle of the quaternion. More... | |
Static Public Attributes | |
static Quaternion | Zero => new Quaternion() |
A Quaternion with all of its components set to zero. More... | |
static Quaternion | One => new Quaternion(1.0f, 1.0f, 1.0f, 1.0f) |
A Quaternion with all of its components set to one. More... | |
static Quaternion | Identity => new Quaternion(0.0f, 0.0f, 0.0f, 1.0f) |
The identity Quaternion (0, 0, 0, 1). More... | |
Properties | |
Vector3 | Axis [get] |
Gets the axis components of the quaternion. More... | |
GTA.Math.Quaternion.Quaternion | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Initializes a new instance of the Quaternion structure.
x | The X component of the quaternion. |
y | The Y component of the quaternion. |
z | The Z component of the quaternion. |
w | The W component of the quaternion. |
GTA.Math.Quaternion.Quaternion | ( | Vector3 | axis, |
float | angle | ||
) |
Initializes a new instance of the Quaternion structure.
axis | The axis of rotation. |
angle | The angle of rotation in radians. |
|
static |
Adds two quaternions.
left | The first quaternion to add. |
right | The second quaternion to add. |
|
static |
Returns the angle in degrees between two rotations a and b.
a | The first quaternion to calculate angle. |
b | The second quaternion to calculate angle. |
void GTA.Math.Quaternion.Conjugate | ( | ) |
Conjugates the quaternion.
|
static |
Creates the conjugate of a specified Quaternion.
value | The Quaternion of which to return the conjugate. |
|
static |
Creates a Quaternion from the given relative x, y, z axis
The Vectors need to be perpendicular to each other
rightVector | Relative X axis |
forwardVector | Relative Y axis |
upVector | Relative Z axis |
|
static |
Divides a quaternion by another.
left | The first quaternion to divide. |
right | The second quaternion to divide. |
|
static |
Calculates the dot product of two quaternions.
left | First source quaternion. |
right | Second source quaternion. |
override bool GTA.Math.Quaternion.Equals | ( | object | obj | ) |
Returns a value that indicates whether the current instance is equal to a specified object.
obj | Object to make the comparison with. |
true
if the current instance is equal to the specified object; false
otherwise.bool GTA.Math.Quaternion.Equals | ( | Quaternion | other | ) |
Returns a value that indicates whether the current instance is equal to the specified object.
other | Object to make the comparison with. |
true
if the current instance is equal to the specified object; false
otherwise.
|
static |
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).
zaxis | Z degrees. |
xaxis | X degrees. |
yaxis | Y degrees. |
|
static |
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 | Euler angles in degrees. euler.X = around X axis, euler.Y = around Y axis, euler.Z = around Z axis |
|
static |
Creates a rotation which rotates from fromDirection to toDirection.
|
static |
Get direction vectors from the given quaternion
quaternion | The quaternion |
rightVector | RightVector = relative x axis |
forwardVector | ForwardVector = relative y axis |
upVector | UpVector = relative z axis |
override int GTA.Math.Quaternion.GetHashCode | ( | ) |
Returns the hash code for this instance.
void GTA.Math.Quaternion.Invert | ( | ) |
Conjugates and renormalizes the quaternion.
|
static |
Conjugates and renormalizes the quaternion.
quaternion | The quaternion to conjugate and re-normalize. |
float GTA.Math.Quaternion.Length | ( | ) |
Calculates the length of the quaternion.
float GTA.Math.Quaternion.LengthSquared | ( | ) |
Calculates the squared length of the quaternion.
|
static |
Performs a linear interpolation between two quaternion.
start | Start quaternion. |
end | End quaternion. |
amount | Value between 0 and 1 indicating the weight of end . |
This method performs the linear interpolation based on the following formula.
Passing amount a value of 0 will cause start to be returned; a value of 1 will cause end to be returned.
|
static |
Multiplies two Quaternions together.
left | The Quaternion on the left side of the multiplication. |
right | The Quaternion on the right side of the multiplication. |
|
static |
Scales a quaternion by the given value.
quaternion | The quaternion to scale. |
scale | The amount by which to scale the quaternion. |
|
static |
Reverses the direction of a given quaternion.
quaternion | The quaternion to negate. |
void GTA.Math.Quaternion.Normalize | ( | ) |
Converts the quaternion into a unit quaternion.
|
static |
Converts the quaternion into a unit quaternion.
quaternion | The quaternion to normalize. |
|
static |
Tests for inequality between two objects.
left | The first value to compare. |
right | The second value to compare. |
true
if left has a different value than right ; otherwise, false
.
|
static |
Scales a quaternion by the given value.
quaternion | The quaternion to scale. |
scale | The amount by which to scale the quaternion. |
|
static |
Multiplies a quaternion by another.
left | The first quaternion to multiply. |
right | The second quaternion to multiply. |
|
static |
Scales a quaternion by the given value.
quaternion | The quaternion to scale. |
scale | The amount by which to scale the quaternion. |
|
static |
Rotates the point with rotation.
rotation | The quaternion to rotate the vector. |
point | The vector to be rotated. |
|
static |
Adds two quaternions.
left | The first quaternion to add. |
right | The second quaternion to add. |
|
static |
Subtracts two quaternions.
left | The first quaternion to subtract. |
right | The second quaternion to subtract. |
|
static |
Reverses the direction of a given quaternion.
quaternion | The quaternion to negate. |
|
static |
Divides a Quaternion by another Quaternion.
left | The source Quaternion. |
right | The divisor. |
|
static |
Tests for equality between two objects.
left | The first value to compare. |
right | The second value to compare. |
true
if left has the same value as right ; otherwise, false
.
|
static |
Rotates a rotation from towards to.
from | From Quaternion. |
to | To Quaternion. |
maxDegreesDelta |
|
static |
Rotates the point with rotation.
rotation | The quaternion to rotate the vector. |
point | The vector to be rotated. |
|
static |
Rotates the point with rotation.
rotation | The quaternion to rotate the vector. |
point | The vector to be rotated. |
center | The vector representing the origin of the new coordinate system. |
Rotates the point with rotation.
point | The vector to be rotated. |
Rotates the point with rotation.
point | The vector to be rotated. |
center | The vector representing the origin of the new coordinate system. |
|
static |
Creates a quaternion given a rotation and an axis.
axis | The axis of rotation. |
angle | The angle of rotation in radians. |
|
static |
Creates a quaternion given a rotation matrix.
matrix | The rotation matrix. |
|
static |
Creates a Quaternion from the given yaw, pitch, and roll, in radians.
yaw | The yaw angle, in radians, around the Z-axis. |
pitch | The pitch angle, in radians, around the X-axis. |
roll | The roll angle, in radians, around the Y-axis. |
|
static |
Interpolates between two quaternions, using spherical linear interpolation..
start | Start quaternion. |
end | End quaternion. |
amount | Value between 0 and 1 indicating the weight of end . |
|
static |
Interpolates between two quaternions, using spherical linear interpolation. The parameter /t/ is not clamped.
a | |
b | |
t |
|
static |
Subtracts two quaternions.
left | The first quaternion to subtract. |
right | The second quaternion to subtract. |
override string GTA.Math.Quaternion.ToString | ( | ) |
Converts the value of the object to its equivalent string representation.
string GTA.Math.Quaternion.ToString | ( | string | format | ) |
Converts the value of the object to its equivalent string representation.
format | The format. |
float GTA.Math.Quaternion.Angle => ((System.Math.Abs(W) <= 1.0f) ? 2.0f * (float)(System.Math.Acos(W)) : 0.0f) |
Gets the angle of the quaternion.
|
static |
The identity Quaternion (0, 0, 0, 1).
|
static |
A Quaternion with all of its components set to one.
float GTA.Math.Quaternion.W |
Gets or sets the W component of the quaternion.
The W component of the quaternion.
float GTA.Math.Quaternion.X |
Gets or sets the X component of the quaternion.
The X component of the quaternion.
float GTA.Math.Quaternion.Y |
Gets or sets the Y component of the quaternion.
The Y component of the quaternion.
float GTA.Math.Quaternion.Z |
Gets or sets the Z component of the quaternion.
The Z component of the quaternion.
|
static |
A Quaternion with all of its components set to zero.
|
get |
Gets the axis components of the quaternion.