Tanoda
|
Public Member Functions | |
Vector3 | GetPalmPosition () |
Quaternion | GetPalmRotation () |
Vector3 | GetPalmDirection () |
Vector3 | GetPalmNormal () |
Vector3 | GetArmDirection () |
Vector3 | GetArmCenter () |
float | GetArmLength () |
float | GetArmWidth () |
Vector3 | GetElbowPosition () |
Vector3 | GetWristPosition () |
Quaternion | GetArmRotation () |
override Hand | GetLeapHand () |
override void | SetLeapHand (Hand hand) |
override void | InitHand () |
int | LeapID () |
abstract override void | UpdateHand () |
![]() | |
virtual void | InitHand () |
virtual void | BeginHand () |
abstract void | UpdateHand () |
void | UpdateHandWithEvent () |
virtual void | FinishHand () |
abstract Hand | GetLeapHand () |
abstract void | SetLeapHand (Hand hand) |
virtual bool | SupportsEditorPersistence () |
Returns whether or not this hand model supports editor persistence. This is false by default and must be opt-in by a developer making their own hand model script if they want editor persistence. More... | |
Public Attributes | |
float | handModelPalmWidth = 0.085f |
FingerModel[] | fingers = new FingerModel[NUM_FINGERS] |
Transform | palm |
Transform | forearm |
Transform | wristJoint |
Transform | elbowJoint |
![]() | |
HandModelManager.ModelGroup | group |
Static Public Attributes | |
const int | NUM_FINGERS = 5 |
Protected Attributes | |
Hand | hand_ |
Properties | |
override Chirality | Handedness [get, set] |
abstract override ModelType | HandModelType [get] |
![]() | |
bool | IsTracked [get] |
abstract Chirality | Handedness [get, set] |
abstract ModelType | HandModelType [get] |
Additional Inherited Members | |
![]() | |
Action | OnBegin |
Action | OnFinish |
Action | OnUpdate |
Called directly after the HandModelBase's UpdateHand(). More... | |
The base class for all hand models, both graphics and physics.
This class serves as the interface between the HandController object and the concrete hand object containing the graphics and physics of a hand.
Subclasses of HandModel must implement InitHand() and UpdateHand(). The UpdateHand() function is called in the Unity Update() phase for graphics HandModel instances; and in the Unity FixedUpdate() phase for physics objects. InitHand() is called once, when the hand is created and is followed by a call to UpdateHand().
Definition at line 25 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetArmCenter | ( | ) |
Calculates the center of the forearm in global coordinates.
Definition at line 127 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetArmDirection | ( | ) |
Calculates the direction vector of the forearm in global coordinates.
Definition at line 114 of file HandModel.cs.
float Leap.Unity.HandModel.GetArmLength | ( | ) |
Returns the measured length of the forearm in meters.
Definition at line 139 of file HandModel.cs.
Quaternion Leap.Unity.HandModel.GetArmRotation | ( | ) |
Calculates the rotation of the forearm in global coordinates.
Definition at line 179 of file HandModel.cs.
float Leap.Unity.HandModel.GetArmWidth | ( | ) |
Returns the measured width of the forearm in meters.
Definition at line 144 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetElbowPosition | ( | ) |
Calculates the position of the elbow in global coordinates.
Definition at line 151 of file HandModel.cs.
|
virtual |
Returns the Leap Hand object represented by this HandModel. Note that any physical quantities and directions obtained from the Leap Hand object are relative to the Leap Motion coordinate system, which uses a right-handed axes and units of millimeters.
Implements Leap.Unity.HandModelBase.
Definition at line 196 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetPalmDirection | ( | ) |
Calculates the direction vector of the hand in global coordinates.
Definition at line 88 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetPalmNormal | ( | ) |
Calculates the normal vector projecting from the hand in global coordinates.
Definition at line 101 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetPalmPosition | ( | ) |
Calculates the position of the palm in global coordinates.
Definition at line 66 of file HandModel.cs.
Quaternion Leap.Unity.HandModel.GetPalmRotation | ( | ) |
Calculates the rotation of the hand in global coordinates.
Definition at line 73 of file HandModel.cs.
Vector3 Leap.Unity.HandModel.GetWristPosition | ( | ) |
Calculates the position of the wrist in global coordinates.
Definition at line 165 of file HandModel.cs.
|
virtual |
Implement this function to initialise this hand after it is created. This function is called by the HandController during the Unity Update() phase when a new hand is detected by the Leap Motion device.
Reimplemented from Leap.Unity.HandModelBase.
Reimplemented in Leap.Unity.RiggedHand, Leap.Unity.RigidHand, and Leap.Unity.PolyHand.
Definition at line 219 of file HandModel.cs.
int Leap.Unity.HandModel.LeapID | ( | ) |
Returns the ID associated with the hand in the Leap API. This ID is guaranteed to be unique among all hands in a frame, and is invariant for the lifetime of the hand model.
Definition at line 233 of file HandModel.cs.
|
virtual |
Assigns a Leap Hand object to this hand model. Note that the Leap Hand objects are recreated every frame. The parent HandController calls this method to set or update the underlying hand.
Implements Leap.Unity.HandModelBase.
Definition at line 205 of file HandModel.cs.
|
pure virtual |
Implement this function to update this hand once every game loop. For HandModel instances assigned to the HandController graphics hand list, the HandController calls this function during the Unity Update() phase. For HandModel instances in the physics hand list, the HandController calls this function in the FixedUpdate() phase.
Implements Leap.Unity.HandModelBase.
Implemented in Leap.Unity.RiggedHand, Leap.Unity.RigidHand, Leap.Unity.SkeletalHand, and Leap.Unity.PolyHand.
Transform Leap.Unity.HandModel.elbowJoint |
Transform object for the elbow joint of this hand.
Definition at line 57 of file HandModel.cs.
FingerModel [] Leap.Unity.HandModel.fingers = new FingerModel[NUM_FINGERS] |
The array of finger objects for this hand. The array is ordered from thumb (element 0) to pinky (element 4).
Definition at line 47 of file HandModel.cs.
Transform Leap.Unity.HandModel.forearm |
Transform object for the forearm object of this hand.
Definition at line 53 of file HandModel.cs.
|
protected |
The Leap Hand object this hand model represents.
Definition at line 61 of file HandModel.cs.
float Leap.Unity.HandModel.handModelPalmWidth = 0.085f |
The model width of the hand in meters. This value is used with the measured value of the user's hand to scale the model proportionally.
Definition at line 45 of file HandModel.cs.
|
static |
The number of fingers on a hand.
Definition at line 40 of file HandModel.cs.
Transform Leap.Unity.HandModel.palm |
Transform object for the palm object of this hand.
Definition at line 51 of file HandModel.cs.
Transform Leap.Unity.HandModel.wristJoint |
Transform object for the wrist joint of this hand.
Definition at line 55 of file HandModel.cs.
|
getset |
Definition at line 29 of file HandModel.cs.
|
get |
Definition at line 35 of file HandModel.cs.