Class QuaternionExtensions
Inheritance
object
QuaternionExtensions
Namespace: TetraCreations.Core
Assembly: cs.temp.dll.dll
Syntax
public static class QuaternionExtensions
Methods
Add(Quaternion, float, float, float, float)
Add any point to the value in original Quaternion (x, y, z, w).
Declaration
public static Quaternion Add(this Quaternion quaternion, float x = 0, float y = 0, float z = 0, float w = 0)
Parameters
Type |
Name |
Description |
Quaternion |
quaternion |
|
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Returns
Type |
Description |
Quaternion |
|
EulerWith(Quaternion, float?, float?, float?)
Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis; applied in that order.
Identical to Quaternion.Euler however we can specify which axes to rotate.
Declaration
public static Quaternion EulerWith(this Quaternion quaternion, float? x = null, float? y = null, float? z = null)
Parameters
Type |
Name |
Description |
Quaternion |
quaternion |
|
float? |
x |
|
float? |
y |
|
float? |
z |
|
Returns
Type |
Description |
Quaternion |
|
With(Quaternion, float?, float?, float?, float?)
Return a new Quaternion while changing any value in original Quaternion (x, y, z, w).
Declaration
public static Quaternion With(this Quaternion quaternion, float? x = null, float? y = null, float? z = null, float? w = null)
Parameters
Type |
Name |
Description |
Quaternion |
quaternion |
|
float? |
x |
|
float? |
y |
|
float? |
z |
|
float? |
w |
|
Returns
Type |
Description |
Quaternion |
|