Tanoda
Leap.Unity.Pose Struct Reference

A position and rotation. You can multiply two poses; this acts like Matrix4x4 multiplication, but Poses always have unit scale. More...

Inheritance diagram for Leap.Unity.Pose:
Leap.Unity.Encoding.IInterpolable< Pose >

Public Member Functions

 Pose (Vector3 position)
 
 Pose (Quaternion rotation)
 
 Pose (Vector3 position, Quaternion rotation)
 
bool ApproxEquals (Pose other)
 
override string ToString ()
 
string ToString (string format)
 
override bool Equals (object obj)
 
bool Equals (Pose other)
 
override int GetHashCode ()
 
Pose CopyFrom (Pose h)
 
bool FillLerped (Pose a, Pose b, float t)
 
bool FillSplined (Pose a, Pose b, Pose c, Pose d, float t)
 
- Public Member Functions inherited from Leap.Unity.Encoding.IInterpolable< Pose >
CopyFrom (T toCopy)
 
bool FillLerped (T from, T to, float t)
 
bool FillSplined (T a, T b, T c, T d, float t)
 

Static Public Member Functions

static Pose operator* (Pose A, Pose B)
 Returns Pose B transformed by Pose A, like a transform hierarchy with A as the parent of B. More...
 
static Pose operator+ (Pose A, Pose B)
 Returns the accumulation of the two poses: The positions summed, and with rotation A.rotation * B.rotation. Note that this accumulates the poses without interpreting either pose as a parent space of the other; but also beware that rotations are noncommutative, so this operation is also noncommutative. More...
 
static Pose operator* (Pose pose, Vector3 localPosition)
 Transforms the right-hand-side Vector3 as a local-space position into world space as if this Pose were its reference frame or parent. More...
 
static Pose operator* (Pose pose, Quaternion localRotation)
 
static Pose operator* (Quaternion parentRotation, Pose localPose)
 
static Pose operator* (Matrix4x4 matrix, Pose localPose)
 Non-projective matrices only (MultiplyPoint3x4). More...
 
static Pose Lerp (Pose a, Pose b, float t)
 Returns a pose interpolated (Lerp for position, Slerp, NOT Lerp for rotation) between a and b by t from 0 to 1. This method clamps t between 0 and 1; if extrapolation is desired, see Extrapolate. More...
 
static Pose LerpUnclamped (Pose a, Pose b, float t)
 As Lerp, but doesn't clamp t between 0 and 1. Values above one extrapolate forwards beyond b, while values less than zero extrapolate backwards past a. More...
 
static Pose LerpUnclampedTimed (Pose a, float aTime, Pose b, float bTime, float extrapolateTime)
 As LerpUnclamped, but extrapolates using time values for a and b, and a target time at which to determine the extrapolated pose. More...
 
static bool operator== (Pose a, Pose b)
 
static bool operator!= (Pose a, Pose b)
 

Public Attributes

Vector3 position
 
Quaternion rotation
 

Static Public Attributes

static readonly Pose identity = new Pose(Vector3.zero, Quaternion.identity)
 

Properties

Pose inverse [get]
 
Matrix4x4 matrix [get]
 Returns a Matrix4x4 corresponding to this pose's translation and rotation, with unit scale. More...
 

Detailed Description

A position and rotation. You can multiply two poses; this acts like Matrix4x4 multiplication, but Poses always have unit scale.

Definition at line 21 of file Pose.cs.

Constructor & Destructor Documentation

◆ Pose() [1/3]

Leap.Unity.Pose.Pose ( Vector3  position)

Definition at line 26 of file Pose.cs.

◆ Pose() [2/3]

Leap.Unity.Pose.Pose ( Quaternion  rotation)

Definition at line 28 of file Pose.cs.

◆ Pose() [3/3]

Leap.Unity.Pose.Pose ( Vector3  position,
Quaternion  rotation 
)

Definition at line 30 of file Pose.cs.

Member Function Documentation

◆ ApproxEquals()

bool Leap.Unity.Pose.ApproxEquals ( Pose  other)

Definition at line 98 of file Pose.cs.

◆ CopyFrom()

Pose Leap.Unity.Pose.CopyFrom ( Pose  h)

Definition at line 169 of file Pose.cs.

◆ Equals() [1/2]

override bool Leap.Unity.Pose.Equals ( object  obj)

Definition at line 143 of file Pose.cs.

◆ Equals() [2/2]

bool Leap.Unity.Pose.Equals ( Pose  other)

Definition at line 147 of file Pose.cs.

◆ FillLerped()

bool Leap.Unity.Pose.FillLerped ( Pose  a,
Pose  b,
float  t 
)

Definition at line 174 of file Pose.cs.

◆ FillSplined()

bool Leap.Unity.Pose.FillSplined ( Pose  a,
Pose  b,
Pose  c,
Pose  d,
float  t 
)

Definition at line 178 of file Pose.cs.

◆ GetHashCode()

override int Leap.Unity.Pose.GetHashCode ( )

Definition at line 152 of file Pose.cs.

◆ Lerp()

static Pose Leap.Unity.Pose.Lerp ( Pose  a,
Pose  b,
float  t 
)
static

Returns a pose interpolated (Lerp for position, Slerp, NOT Lerp for rotation) between a and b by t from 0 to 1. This method clamps t between 0 and 1; if extrapolation is desired, see Extrapolate.

Definition at line 107 of file Pose.cs.

◆ LerpUnclamped()

static Pose Leap.Unity.Pose.LerpUnclamped ( Pose  a,
Pose  b,
float  t 
)
static

As Lerp, but doesn't clamp t between 0 and 1. Values above one extrapolate forwards beyond b, while values less than zero extrapolate backwards past a.

Definition at line 118 of file Pose.cs.

◆ LerpUnclampedTimed()

static Pose Leap.Unity.Pose.LerpUnclampedTimed ( Pose  a,
float  aTime,
Pose  b,
float  bTime,
float  extrapolateTime 
)
static

As LerpUnclamped, but extrapolates using time values for a and b, and a target time at which to determine the extrapolated pose.

Definition at line 127 of file Pose.cs.

◆ operator!=()

static bool Leap.Unity.Pose.operator!= ( Pose  a,
Pose  b 
)
static

Definition at line 163 of file Pose.cs.

◆ operator*() [1/5]

static Pose Leap.Unity.Pose.operator* ( Matrix4x4  matrix,
Pose  localPose 
)
static

Non-projective matrices only (MultiplyPoint3x4).

Definition at line 93 of file Pose.cs.

◆ operator*() [2/5]

static Pose Leap.Unity.Pose.operator* ( Pose  A,
Pose  B 
)
static

Returns Pose B transformed by Pose A, like a transform hierarchy with A as the parent of B.

Definition at line 59 of file Pose.cs.

◆ operator*() [3/5]

static Pose Leap.Unity.Pose.operator* ( Pose  pose,
Quaternion  localRotation 
)
static

Definition at line 84 of file Pose.cs.

◆ operator*() [4/5]

static Pose Leap.Unity.Pose.operator* ( Pose  pose,
Vector3  localPosition 
)
static

Transforms the right-hand-side Vector3 as a local-space position into world space as if this Pose were its reference frame or parent.

Definition at line 79 of file Pose.cs.

◆ operator*() [5/5]

static Pose Leap.Unity.Pose.operator* ( Quaternion  parentRotation,
Pose  localPose 
)
static

Definition at line 88 of file Pose.cs.

◆ operator+()

static Pose Leap.Unity.Pose.operator+ ( Pose  A,
Pose  B 
)
static

Returns the accumulation of the two poses: The positions summed, and with rotation A.rotation * B.rotation. Note that this accumulates the poses without interpreting either pose as a parent space of the other; but also beware that rotations are noncommutative, so this operation is also noncommutative.

Definition at line 70 of file Pose.cs.

◆ operator==()

static bool Leap.Unity.Pose.operator== ( Pose  a,
Pose  b 
)
static

Definition at line 159 of file Pose.cs.

◆ ToString() [1/2]

override string Leap.Unity.Pose.ToString ( )

Definition at line 133 of file Pose.cs.

◆ ToString() [2/2]

string Leap.Unity.Pose.ToString ( string  format)

Definition at line 138 of file Pose.cs.

Member Data Documentation

◆ identity

readonly Pose Leap.Unity.Pose.identity = new Pose(Vector3.zero, Quaternion.identity)
static

Definition at line 35 of file Pose.cs.

◆ position

Vector3 Leap.Unity.Pose.position

Definition at line 23 of file Pose.cs.

◆ rotation

Quaternion Leap.Unity.Pose.rotation

Definition at line 24 of file Pose.cs.

Property Documentation

◆ inverse

Pose Leap.Unity.Pose.inverse
get

Definition at line 37 of file Pose.cs.

◆ matrix

Matrix4x4 Leap.Unity.Pose.matrix
get

Returns a Matrix4x4 corresponding to this pose's translation and rotation, with unit scale.

Definition at line 48 of file Pose.cs.


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