TrueSync
|
A Quaternion representing an orientation. More...
Public Member Functions | |
TSQuaternion (FP x, FP y, FP z, FP w) | |
Initializes a new instance of the JQuaternion structure. More... | |
void | Set (FP new_x, FP new_y, FP new_z, FP new_w) |
void | SetFromToRotation (TSVector fromDirection, TSVector toDirection) |
void | Normalize () |
Sets the length of the quaternion to one. More... | |
override string | ToString () |
Static Public Member Functions | |
static FP | Angle (TSQuaternion a, TSQuaternion b) |
static TSQuaternion | Add (TSQuaternion quaternion1, TSQuaternion quaternion2) |
Quaternions are added. More... | |
static TSQuaternion | Euler (FP x, FP y, FP z) |
static TSQuaternion | Euler (TSVector eulerAngles) |
static TSQuaternion | AngleAxis (FP angle, TSVector axis) |
static void | CreateFromYawPitchRoll (FP yaw, FP pitch, FP roll, out TSQuaternion result) |
static void | Add (ref TSQuaternion quaternion1, ref TSQuaternion quaternion2, out TSQuaternion result) |
Quaternions are added. More... | |
static TSQuaternion | Conjugate (TSQuaternion value) |
static FP | Dot (TSQuaternion a, TSQuaternion b) |
static TSQuaternion | Inverse (TSQuaternion rotation) |
static TSQuaternion | FromToRotation (TSVector fromVector, TSVector toVector) |
static TSQuaternion | Lerp (TSQuaternion a, TSQuaternion b, FP t) |
static TSQuaternion | LerpUnclamped (TSQuaternion a, TSQuaternion b, FP t) |
static TSQuaternion | Subtract (TSQuaternion quaternion1, TSQuaternion quaternion2) |
Quaternions are subtracted. More... | |
static void | Subtract (ref TSQuaternion quaternion1, ref TSQuaternion quaternion2, out TSQuaternion result) |
Quaternions are subtracted. More... | |
static TSQuaternion | Multiply (TSQuaternion quaternion1, TSQuaternion quaternion2) |
Multiply two quaternions. More... | |
static void | Multiply (ref TSQuaternion quaternion1, ref TSQuaternion quaternion2, out TSQuaternion result) |
Multiply two quaternions. More... | |
static TSQuaternion | Multiply (TSQuaternion quaternion1, FP scaleFactor) |
Scale a quaternion More... | |
static void | Multiply (ref TSQuaternion quaternion1, FP scaleFactor, out TSQuaternion result) |
Scale a quaternion More... | |
static TSQuaternion | CreateFromMatrix (TSMatrix matrix) |
Creates a quaternion from a matrix. More... | |
static void | CreateFromMatrix (ref TSMatrix matrix, out TSQuaternion result) |
Creates a quaternion from a matrix. More... | |
static TSQuaternion | operator* (TSQuaternion value1, TSQuaternion value2) |
Multiply two quaternions. More... | |
static TSQuaternion | operator+ (TSQuaternion value1, TSQuaternion value2) |
Add two quaternions. More... | |
static TSQuaternion | operator- (TSQuaternion value1, TSQuaternion value2) |
Subtract two quaternions. More... | |
static TSVector | operator* (TSQuaternion quat, TSVector vec) |
Rotates a TSVector by the TSQuanternion. | |
Public Attributes | |
FP | x |
The X component of the quaternion. More... | |
FP | y |
The Y component of the quaternion. More... | |
FP | z |
The Z component of the quaternion. More... | |
FP | w |
The W component of the quaternion. More... | |
Static Public Attributes | |
static readonly TSQuaternion | identity |
Properties | |
TSVector | eulerAngles [get] |
A Quaternion representing an orientation.
Definition at line 29 of file TSQuaternion.cs.
TrueSync.TSQuaternion.TSQuaternion | ( | FP | x, |
FP | y, | ||
FP | z, | ||
FP | w | ||
) |
Initializes a new instance of the JQuaternion 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. |
Definition at line 54 of file TSQuaternion.cs.
|
static |
Quaternions are added.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
Definition at line 116 of file TSQuaternion.cs.
|
static |
Quaternions are added.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
result | The sum of both quaternions. |
Definition at line 178 of file TSQuaternion.cs.
|
static |
Creates a quaternion from a matrix.
matrix | A matrix representing an orientation. |
Definition at line 348 of file TSQuaternion.cs.
|
static |
Creates a quaternion from a matrix.
matrix | A matrix representing an orientation. |
result | JQuaternion representing an orientation. |
Definition at line 360 of file TSQuaternion.cs.
|
static |
Multiply two quaternions.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
Definition at line 264 of file TSQuaternion.cs.
|
static |
Multiply two quaternions.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
result | The product of both quaternions. |
Definition at line 277 of file TSQuaternion.cs.
|
static |
Scale a quaternion
quaternion1 | The quaternion to scale. |
scaleFactor | Scale factor. |
Definition at line 305 of file TSQuaternion.cs.
|
static |
Scale a quaternion
quaternion1 | The quaternion to scale. |
scaleFactor | Scale factor. |
result | The scaled quaternion. |
Definition at line 318 of file TSQuaternion.cs.
void TrueSync.TSQuaternion.Normalize | ( | ) |
Sets the length of the quaternion to one.
Definition at line 331 of file TSQuaternion.cs.
|
static |
Multiply two quaternions.
value1 | The first quaternion. |
value2 | The second quaternion. |
Definition at line 409 of file TSQuaternion.cs.
|
static |
Add two quaternions.
value1 | The first quaternion. |
value2 | The second quaternion. |
Definition at line 424 of file TSQuaternion.cs.
|
static |
Subtract two quaternions.
value1 | The first quaternion. |
value2 | The second quaternion. |
Definition at line 439 of file TSQuaternion.cs.
|
static |
Quaternions are subtracted.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
Definition at line 235 of file TSQuaternion.cs.
|
static |
Quaternions are subtracted.
quaternion1 | The first quaternion. |
quaternion2 | The second quaternion. |
result | The difference of both quaternions. |
Definition at line 248 of file TSQuaternion.cs.
FP TrueSync.TSQuaternion.w |
The W component of the quaternion.
Definition at line 39 of file TSQuaternion.cs.
FP TrueSync.TSQuaternion.x |
The X component of the quaternion.
Definition at line 33 of file TSQuaternion.cs.
FP TrueSync.TSQuaternion.y |
The Y component of the quaternion.
Definition at line 35 of file TSQuaternion.cs.
FP TrueSync.TSQuaternion.z |
The Z component of the quaternion.
Definition at line 37 of file TSQuaternion.cs.