class MAGES::Interaction::FingerPose¶
Overview¶
A predefined finger pose. More…
class FingerPose { public: // properties int FingerIndex; ListBonePoses; // methods FingerPose(); FingerPose(int fingerIndex, List bonePoses); FingerPose(FingerPose from); void CopyValuesFrom(FingerPose pose); override bool Equals(object obj); override int GetHashCode(); static bool operator == (FingerPose p1, FingerPose p2); static bool operator != (FingerPose p1, FingerPose p2); static FingerPose Copy(FingerPose original); static FingerPose Lerp(FingerPose p1, FingerPose p2, float t); static void LerpNonAlloc( FingerPose p1, FingerPose p2, float t, FingerPose result ); };
Detailed Documentation¶
A predefined finger pose.
Properties¶
int FingerIndex
Gets or sets the finger index.
ListBonePoses
Gets or sets the poses for each bone in the finger.
Methods¶
FingerPose()
Initializes a new instance of the FingerPose class.
FingerPose(int fingerIndex, ListbonePoses)
Initializes a new instance of the FingerPose class.
Parameters:
fingerIndex |
The finger index of this finger pose. |
bonePoses |
The finger bones’ poses. |
FingerPose(FingerPose from)
Initializes a new instance of the FingerPose class. The new instance is a copy of the given finger pose.
Parameters:
from |
The pose to copy data from. |
void CopyValuesFrom(FingerPose pose)
Copies all the bone poses from the given finger pose to this.
Parameters:
pose |
The pose to get the values from. |
override bool Equals(object obj)
Checks if the finger pose is equals to obj. Equality is defined as obj beeing a finger pose and having the same finger index and the same bone poses.
Parameters:
obj |
The object to compare to. |
Returns:
true
if equal.
override int GetHashCode()
Gets the hash code for this finger pose.
Returns:
The hashcode.
static bool operator == (FingerPose p1, FingerPose p2)
Checks if two finger poses are equal. Equality is defined as having the same finger index and the same bone poses.
Parameters:
p1 |
Finger pose 1. |
p2 |
Finger pose 2. |
Returns:
true
if equal.
static bool operator != (FingerPose p1, FingerPose p2)
Checks if two finger poses are not equal. Equality is defined as having the same finger index and the same bone poses.
Parameters:
p1 |
Finger pose 1. |
p2 |
Finger pose 2. |
Returns:
true
if not equal.
static FingerPose Copy(FingerPose original)
Creates a copy of the given finger pose.
Parameters:
original |
The pose to get data from. |
Returns:
A new copy of the original.
static FingerPose Lerp(FingerPose p1, FingerPose p2, float t)
Lerps between two finger poses.
Parameters:
p1 |
FingerPose 1. |
p2 |
FingerPose 2. |
t |
The interpolation factor. A value between 0 and 1. |
Returns:
The interpolated finger pose.
static void LerpNonAlloc( FingerPose p1, FingerPose p2, float t, FingerPose result )
Lerps between two finger poses, and stores the result in the given finger pose, without allocating new memory.
Parameters:
p1 |
FingerPose 1. |
p2 |
FingerPose 2. |
t |
The interpolation factor. A value between 0 and 1. |
result |
The FingerPose where the result should be stored. Must not be |