Свойство | Тип | Описание | |
---|---|---|---|
Zero | Quaternion | ||
precision | float |
Метод | Описание | |
---|---|---|
DifferenceBetween ( Quaternion right, Quaternion left ) : float |
Calculates the difference in rotation between two Quaternions if result is 0, there is no difference between the Quaternions if the results is 1, the difference is 180 degrees difference
|
|
FromMatrix ( Matrix4 matrix ) : Quaternion |
Builds a quaternion from the given rotation matrix
|
|
FromMatrix ( Matrix4 &matrix, Quaternion &result ) : void |
Builds a quaternion from the given rotation matrix
|
|
GetOrientation ( OpenTK.Vector3 forwardPoint, OpenTK.Vector3 leftPoint, OpenTK.Vector3 rightPoint ) : Quaternion |
Get orientation of three points, where on point defines forward
|
|
GetOrientationFromYX ( OpenTK.Vector3 y, OpenTK.Vector3 x ) : Quaternion |
Get quaternion with front and right vector
|
|
GetOrientationFromZY ( OpenTK.Vector3 z, OpenTK.Vector3 y ) : Quaternion |
Get quaternion with front and right vector
|
|
GetRotationBetween ( OpenTK.Vector3 a, OpenTK.Vector3 b, float stiffness = 1f ) : Quaternion |
Returns a quaternion representing the rotation from vector a to b Robust, does not return NaN
|
|
IsNaN ( this q ) : bool |
Check if any element in quaternion is NaN
|
|
LookAtRight ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 x ) : Quaternion |
Get quaternion with rotation as Y axis from source towards target and X close to right parameter
|
|
LookAtUp ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 z ) : Quaternion |
Get quaternion with rotation as Y axis towards target as close as z parameter as possible
|
|
Rotate ( Quaternion quaternion, OpenTK.Vector3 vec ) : OpenTK.Vector3 | ||
RotationBetween ( OpenTK.Vector3 from, OpenTK.Vector3 to ) : Quaternion |
Returns a quaternion representing the rotation between vectors Not robust, but faster
|
|
RotationX ( float radians ) : Quaternion |
Rotation around X axis
|
|
RotationY ( float radians ) : Quaternion |
Rotation around Y axis
|
|
RotationZ ( float radians ) : Quaternion |
Rotation around Z axis
|
public static DifferenceBetween ( Quaternion right, Quaternion left ) : float | ||
right | Quaternion | |
left | Quaternion | |
Результат | float |
public static FromMatrix ( Matrix4 matrix ) : Quaternion | ||
matrix | Matrix4 | A rotation matrix |
Результат | Quaternion |
public static FromMatrix ( Matrix4 &matrix, Quaternion &result ) : void | ||
matrix | Matrix4 | A rotation matrix |
result | Quaternion | The equivalent quaternion |
Результат | void |
public static GetOrientation ( OpenTK.Vector3 forwardPoint, OpenTK.Vector3 leftPoint, OpenTK.Vector3 rightPoint ) : Quaternion | ||
forwardPoint | OpenTK.Vector3 | |
leftPoint | OpenTK.Vector3 | |
rightPoint | OpenTK.Vector3 | |
Результат | Quaternion |
public static GetOrientationFromYX ( OpenTK.Vector3 y, OpenTK.Vector3 x ) : Quaternion | ||
y | OpenTK.Vector3 | |
x | OpenTK.Vector3 | |
Результат | Quaternion |
public static GetOrientationFromZY ( OpenTK.Vector3 z, OpenTK.Vector3 y ) : Quaternion | ||
z | OpenTK.Vector3 | |
y | OpenTK.Vector3 | |
Результат | Quaternion |
public static GetRotationBetween ( OpenTK.Vector3 a, OpenTK.Vector3 b, float stiffness = 1f ) : Quaternion | ||
a | OpenTK.Vector3 | The first vector |
b | OpenTK.Vector3 | The secound vector |
stiffness | float | Stiffness value |
Результат | Quaternion |
public static LookAtRight ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 x ) : Quaternion | ||
source | OpenTK.Vector3 | Position vector to look from |
target | OpenTK.Vector3 | Position vector to look at |
x | OpenTK.Vector3 | |
Результат | Quaternion |
public static LookAtUp ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 z ) : Quaternion | ||
source | OpenTK.Vector3 | The source position vector to look from |
target | OpenTK.Vector3 | |
z | OpenTK.Vector3 | |
Результат | Quaternion |
public static Rotate ( Quaternion quaternion, OpenTK.Vector3 vec ) : OpenTK.Vector3 | ||
quaternion | Quaternion | |
vec | OpenTK.Vector3 | |
Результат | OpenTK.Vector3 |
public static RotationBetween ( OpenTK.Vector3 from, OpenTK.Vector3 to ) : Quaternion | ||
from | OpenTK.Vector3 | The vetor the rotation start from |
to | OpenTK.Vector3 | The vector the quaternion should result in if from vector was transformed by the resulting Quaternion |
Результат | Quaternion |
public static RotationX ( float radians ) : Quaternion | ||
radians | float | rotation amount |
Результат | Quaternion |
public static RotationY ( float radians ) : Quaternion | ||
radians | float | rotation amount |
Результат | Quaternion |
public static RotationZ ( float radians ) : Quaternion | ||
radians | float | rotation amount |
Результат | Quaternion |