The LeapTransform class represents a transform in three dimensional space. More...
Public Member Functions | |
| LeapTransform (Vector translation, LeapQuaternion rotation) | |
| Constructs a new transform from the specified translation and rotation. More... | |
| LeapTransform (Vector translation, LeapQuaternion rotation, Vector scale) | |
| Constructs a new transform from the specified translation, rotation and scale. More... | |
| void | MirrorX () |
| Mirrors this transform's rotation and scale across the x-axis. More... | |
| void | MirrorZ () |
| Mirrors this transform's rotation and scale across the z-axis. More... | |
| Vector | TransformDirection (Vector direction) |
| Transforms the specified direction vector, applying rotation only. More... | |
| Vector | TransformPoint (Vector point) |
| Transforms the specified position vector, applying translation, rotation and scale. More... | |
| LeapQuaternion | TransformQuaternion (LeapQuaternion rhs) |
| Transforms the specified quaternion. More... | |
| Vector | TransformVelocity (Vector velocity) |
| Transforms the specified velocity vector, applying rotation and scale. More... | |
Static Public Attributes | |
| static readonly LeapTransform | Identity = new LeapTransform(Vector.Zero, LeapQuaternion.Identity, Vector.Ones) |
| The identity transform. More... | |
Properties | |
| LeapQuaternion | rotation [get, set] |
| The rotational component of the transform. More... | |
| Vector | scale [get, set] |
| The scale factors of the transform. More... | |
| Vector | translation [get, set] |
| The translation component of the transform. More... | |
| Vector | xBasis [get, set] |
| The x-basis of the transform. More... | |
| Vector | yBasis [get, set] |
| The y-basis of the transform. More... | |
| Vector | zBasis [get, set] |
| The z-basis of the transform. More... | |
The LeapTransform class represents a transform in three dimensional space.
Note that the LeapTransform class replaces the Leap.Matrix class.
| LeapTransform | ( | Vector | translation, |
| LeapQuaternion | rotation | ||
| ) |
Constructs a new transform from the specified translation and rotation.
| translation | the translation vector. |
| rotation | the rotation quaternion. |
| LeapTransform | ( | Vector | translation, |
| LeapQuaternion | rotation, | ||
| Vector | scale | ||
| ) |
Constructs a new transform from the specified translation, rotation and scale.
| translation | the translation vector. |
| rotation | the rotation quaternion. |
| scale | the scale vector. |
| void MirrorX | ( | ) |
Mirrors this transform's rotation and scale across the x-axis.
Translation is not affected.
| void MirrorZ | ( | ) |
Mirrors this transform's rotation and scale across the z-axis.
Translation is not affected.
Transforms the specified direction vector, applying rotation only.
| direction | the direction vector to transform. |
Transforms the specified position vector, applying translation, rotation and scale.
| point | the position vector to transform. |
| LeapQuaternion TransformQuaternion | ( | LeapQuaternion | rhs | ) |
Transforms the specified quaternion.
Multiplies the quaternion representing the rotational part of this transform by the specified quaternion.
Important: Modifying the basis vectors of this transform directly leaves the underlying quaternion in an indeterminate state. Neither this function nor the LeapTransform.rotation quaternion can be used after the basis vectors are set.
| rhs | the quaternion to transform. |
Transforms the specified velocity vector, applying rotation and scale.
| point | the velocity vector to transform. |
|
static |
The identity transform.
|
getset |
The rotational component of the transform.
Important: Modifying the basis vectors of this transform directly leaves the underlying quaternion in an indeterminate state. This rotation quaternion cannot be accessed after the basis vectors are modified directly.
|
getset |
The scale factors of the transform.
Scale is kept separate from translation.
|
getset |
The translation component of the transform.
|
getset |
The x-basis of the transform.
Important: Modifying the basis vectors of this transform directly leaves the underlying quaternion in an indeterminate state. Neither the TransformQuaternion() function nor the LeapTransform.rotation quaternion can be used after the basis vectors are set.
|
getset |
The y-basis of the transform.
Important: Modifying the basis vectors of this transform directly leaves the underlying quaternion in an indeterminate state. Neither the TransformQuaternion() function nor the LeapTransform.rotation quaternion can be used after the basis vectors are set.
|
getset |
The z-basis of the transform.
Important: Modifying the basis vectors of this transform directly leaves the underlying quaternion in an indeterminate state. Neither the TransformQuaternion() function nor the LeapTransform.rotation quaternion can be used after the basis vectors are set.
C# and Unity