Tanoda
Leap.LeapTransform Struct Reference

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...
 
Vector TransformPoint (Vector point)
 Transforms the specified position vector, applying translation, rotation and scale. More...
 
Vector TransformDirection (Vector direction)
 Transforms the specified direction vector, applying rotation only. More...
 
Vector TransformVelocity (Vector velocity)
 Transforms the specified velocity vector, applying rotation and scale. More...
 
LeapQuaternion TransformQuaternion (LeapQuaternion rhs)
 Transforms the specified quaternion. Multiplies the quaternion representing the rotational part of this transform by the specified quaternion. More...
 
void MirrorX ()
 Mirrors this transform's rotation and scale across the x-axis. Translation is not affected. More...
 
void MirrorZ ()
 Mirrors this transform's rotation and scale across the z-axis. Translation is not affected. More...
 

Static Public Attributes

static readonly LeapTransform Identity = new LeapTransform(Vector.Zero, LeapQuaternion.Identity, Vector.Ones)
 The identity transform. More...
 

Properties

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...
 
Vector translation [get, set]
 The translation component of the transform. More...
 
Vector scale [get, set]
 The scale factors of the transform. Scale is kept separate from translation. More...
 
LeapQuaternion rotation [get, set]
 The rotational component of the transform. More...
 

Detailed Description

The LeapTransform class represents a transform in three dimensional space.

Note that the LeapTransform class replaces the Leap.Matrix class.

Since
3.1.2

Definition at line 18 of file LeapTransform.cs.

Constructor & Destructor Documentation

◆ LeapTransform() [1/2]

Leap.LeapTransform.LeapTransform ( Vector  translation,
LeapQuaternion  rotation 
)

Constructs a new transform from the specified translation and rotation.

Since
3.1.2

Definition at line 23 of file LeapTransform.cs.

◆ LeapTransform() [2/2]

Leap.LeapTransform.LeapTransform ( Vector  translation,
LeapQuaternion  rotation,
Vector  scale 
)

Constructs a new transform from the specified translation, rotation and scale.

Since
3.1.2

Definition at line 31 of file LeapTransform.cs.

Member Function Documentation

◆ MirrorX()

void Leap.LeapTransform.MirrorX ( )

Mirrors this transform's rotation and scale across the x-axis. Translation is not affected.

Since
3.1.2

Definition at line 93 of file LeapTransform.cs.

◆ MirrorZ()

void Leap.LeapTransform.MirrorZ ( )

Mirrors this transform's rotation and scale across the z-axis. Translation is not affected.

Since
3.1.2

Definition at line 106 of file LeapTransform.cs.

◆ TransformDirection()

Vector Leap.LeapTransform.TransformDirection ( Vector  direction)

Transforms the specified direction vector, applying rotation only.

Since
3.1.2

Definition at line 51 of file LeapTransform.cs.

◆ TransformPoint()

Vector Leap.LeapTransform.TransformPoint ( Vector  point)

Transforms the specified position vector, applying translation, rotation and scale.

Since
3.1.2

Definition at line 43 of file LeapTransform.cs.

◆ TransformQuaternion()

LeapQuaternion Leap.LeapTransform.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.

Since
3.1.2

Definition at line 74 of file LeapTransform.cs.

◆ TransformVelocity()

Vector Leap.LeapTransform.TransformVelocity ( Vector  velocity)

Transforms the specified velocity vector, applying rotation and scale.

Since
3.1.2

Definition at line 59 of file LeapTransform.cs.

Member Data Documentation

◆ Identity

readonly LeapTransform Leap.LeapTransform.Identity = new LeapTransform(Vector.Zero, LeapQuaternion.Identity, Vector.Ones)
static

The identity transform.

Since
3.1.2

Definition at line 238 of file LeapTransform.cs.

Property Documentation

◆ rotation

LeapQuaternion Leap.LeapTransform.rotation
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.

Since
3.1.2

Definition at line 204 of file LeapTransform.cs.

◆ scale

Vector Leap.LeapTransform.scale
getset

The scale factors of the transform. Scale is kept separate from translation.

Since
3.1.2

Definition at line 185 of file LeapTransform.cs.

◆ translation

Vector Leap.LeapTransform.translation
getset

The translation component of the transform.

Since
3.1.2

Definition at line 173 of file LeapTransform.cs.

◆ xBasis

Vector Leap.LeapTransform.xBasis
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.

Since
3.1.2

Definition at line 124 of file LeapTransform.cs.

◆ yBasis

Vector Leap.LeapTransform.yBasis
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.

Since
3.1.2

Definition at line 142 of file LeapTransform.cs.

◆ zBasis

Vector Leap.LeapTransform.zBasis
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.

Since
3.1.2

Definition at line 160 of file LeapTransform.cs.


The documentation for this struct was generated from the following file: