Tanoda
|
Public Member Functions | |
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 | |
Finger.FingerType | fingerType = Finger.FingerType.TYPE_INDEX |
Transform[] | bones = new Transform[NUM_BONES] |
Transform[] | joints = new Transform[NUM_BONES - 1] |
Static Public Attributes | |
const int | NUM_BONES = 4 |
const int | NUM_JOINTS = 3 |
Protected Attributes | |
Hand | hand_ |
Finger | finger_ |
The base class for all fingers.
This class serves as the interface between the HandController object, the parent Hand object and the concrete finger objects.
Subclasses of FingerModel must implement InitFinger() and UpdateFinger(). The InitHand() function is typically called by the parent HandModel InitHand() method; likewise, the UpdateFinger() function is typically called by the parent HandModel UpdateHand() function.
Definition at line 26 of file FingerModel.cs.
Vector3 Leap.Unity.FingerModel.GetBoneCenter | ( | int | bone_type | ) |
Returns the center of the given bone on the finger
Definition at line 116 of file FingerModel.cs.
Vector3 Leap.Unity.FingerModel.GetBoneDirection | ( | int | bone_type | ) |
Returns the direction the given bone is facing on the finger
Definition at line 128 of file FingerModel.cs.
float Leap.Unity.FingerModel.GetBoneLength | ( | int | bone_type | ) |
Returns the length of the finger bone.
Definition at line 152 of file FingerModel.cs.
Quaternion Leap.Unity.FingerModel.GetBoneRotation | ( | int | bone_type | ) |
Returns the rotation quaternion of the given bone
Definition at line 140 of file FingerModel.cs.
float Leap.Unity.FingerModel.GetBoneWidth | ( | int | bone_type | ) |
Returns the width of the finger bone.
Definition at line 157 of file FingerModel.cs.
float Leap.Unity.FingerModel.GetFingerJointSpreadMecanim | ( | ) |
Returns Mecanim spread angle, which only applies to joint_type = 0 NOTE: Positive spread is towards thumb for index and middle, but is in the opposite direction for the ring and pinky. For the thumb negative spread rotates the thumb in to the palm.
Definition at line 192 of file FingerModel.cs.
float Leap.Unity.FingerModel.GetFingerJointStretchMecanim | ( | int | joint_type | ) |
Returns Mecanim stretch angle in the range (-180, +180] NOTE: Positive stretch opens the hand. For the thumb this moves it away from the palm.
Definition at line 166 of file FingerModel.cs.
Vector3 Leap.Unity.FingerModel.GetJointPosition | ( | int | joint | ) |
Returns the location of the given joint on the finger
Definition at line 95 of file FingerModel.cs.
Finger Leap.Unity.FingerModel.GetLeapFinger | ( | ) |
Definition at line 63 of file FingerModel.cs.
Hand Leap.Unity.FingerModel.GetLeapHand | ( | ) |
Definition at line 61 of file FingerModel.cs.
Ray Leap.Unity.FingerModel.GetRay | ( | ) |
Returns a ray from the tip of the finger in the direction it is pointing.
Definition at line 110 of file FingerModel.cs.
Vector3 Leap.Unity.FingerModel.GetTipPosition | ( | ) |
Returns the location of the tip of the finger
Definition at line 83 of file FingerModel.cs.
|
virtual |
Implement this function to initialize this finger after it is created. Typically, this function is called by the parent HandModel object.
Reimplemented in Leap.Unity.SkeletalFinger, and Leap.Unity.PolyFinger.
Definition at line 69 of file FingerModel.cs.
void Leap.Unity.FingerModel.SetLeapHand | ( | Hand | hand | ) |
Sets the Leap Hand and Leap Finger for this finger. Note that Leap Hand and Finger objects are recreated every frame. The parent HandModel object calls this function to set or update the underlying finger. The tracking data in the Leap objects are used to update the FingerModel.
Definition at line 53 of file FingerModel.cs.
|
pure virtual |
Implement this function to update this finger once per game loop. Typically, this function is called by the parent HandModel object's UpdateHand() function, which is called in the Unity Update() phase for graphics hand models and in the FixedUpdate() phase for physics hand models.
Implemented in Leap.Unity.RiggedFinger, Leap.Unity.RigidFinger, Leap.Unity.SkeletalFinger, and Leap.Unity.PolyFinger.
Transform [] Leap.Unity.FingerModel.bones = new Transform[NUM_BONES] |
Bones positioned and rotated by FingerModel.
Definition at line 38 of file FingerModel.cs.
|
protected |
Definition at line 46 of file FingerModel.cs.
Finger.FingerType Leap.Unity.FingerModel.fingerType = Finger.FingerType.TYPE_INDEX |
Definition at line 34 of file FingerModel.cs.
|
protected |
Definition at line 44 of file FingerModel.cs.
Transform [] Leap.Unity.FingerModel.joints = new Transform[NUM_BONES - 1] |
Joints positioned and rotated by FingerModel.
Definition at line 40 of file FingerModel.cs.
|
static |
The number of bones in a finger.
Definition at line 29 of file FingerModel.cs.
|
static |
The number of joints in a finger.
Definition at line 32 of file FingerModel.cs.