Tanoda
Leap.Unity.RiggedFinger Class Reference

Manages the position and orientation of the bones in a model rigged for skeletal animation. More...

Inheritance diagram for Leap.Unity.RiggedFinger:
Leap.Unity.FingerModel

Public Member Functions

Quaternion Reorientation ()
 
override void UpdateFinger ()
 Updates model bone positions and rotations based on tracked hand data. More...
 
void SetupRiggedFinger (bool useMetaCarpals)
 
- Public Member Functions inherited from Leap.Unity.FingerModel
void SetLeapHand (Hand hand)
 
Hand GetLeapHand ()
 
Finger GetLeapFinger ()
 
virtual void InitFinger ()
 
abstract void UpdateFinger ()
 
Vector3 GetTipPosition ()
 
Vector3 GetJointPosition (int joint)
 
Ray GetRay ()
 
Vector3 GetBoneCenter (int bone_type)
 
Vector3 GetBoneDirection (int bone_type)
 
Quaternion GetBoneRotation (int bone_type)
 
float GetBoneLength (int bone_type)
 
float GetBoneWidth (int bone_type)
 
float GetFingerJointStretchMecanim (int joint_type)
 
float GetFingerJointSpreadMecanim ()
 

Public Attributes

bool deformPosition = false
 Allows the mesh to be stretched to align with finger joint positions. Only set to true when mesh is not visible. More...
 
bool scaleLastFingerBone = false
 
Vector3 modelFingerPointing = Vector3.forward
 
Vector3 modelPalmFacing = -Vector3.up
 
- Public Attributes inherited from Leap.Unity.FingerModel
Finger.FingerType fingerType = Finger.FingerType.TYPE_INDEX
 
Transform[] bones = new Transform[NUM_BONES]
 
Transform[] joints = new Transform[NUM_BONES - 1]
 

Additional Inherited Members

- Static Public Attributes inherited from Leap.Unity.FingerModel
const int NUM_BONES = 4
 
const int NUM_JOINTS = 3
 
- Protected Attributes inherited from Leap.Unity.FingerModel
Hand hand_
 
Finger finger_
 

Detailed Description

Manages the position and orientation of the bones in a model rigged for skeletal animation.

The class expects that the graphics model's bones that correspond to the bones in the Leap Motion hand model are in the same order in the bones array.

Definition at line 22 of file RiggedFinger.cs.

Member Function Documentation

◆ Reorientation()

Quaternion Leap.Unity.RiggedFinger.Reorientation ( )

Definition at line 37 of file RiggedFinger.cs.

◆ SetupRiggedFinger()

void Leap.Unity.RiggedFinger.SetupRiggedFinger ( bool  useMetaCarpals)

Definition at line 114 of file RiggedFinger.cs.

◆ UpdateFinger()

override void Leap.Unity.RiggedFinger.UpdateFinger ( )
virtual

Updates model bone positions and rotations based on tracked hand data.

Implements Leap.Unity.FingerModel.

Definition at line 61 of file RiggedFinger.cs.

Member Data Documentation

◆ deformPosition

bool Leap.Unity.RiggedFinger.deformPosition = false

Allows the mesh to be stretched to align with finger joint positions. Only set to true when mesh is not visible.

Definition at line 29 of file RiggedFinger.cs.

◆ modelFingerPointing

Vector3 Leap.Unity.RiggedFinger.modelFingerPointing = Vector3.forward

Definition at line 34 of file RiggedFinger.cs.

◆ modelPalmFacing

Vector3 Leap.Unity.RiggedFinger.modelPalmFacing = -Vector3.up

Definition at line 35 of file RiggedFinger.cs.

◆ scaleLastFingerBone

bool Leap.Unity.RiggedFinger.scaleLastFingerBone = false

Definition at line 32 of file RiggedFinger.cs.


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