Tanoda
Leap.Unity.RiggedHand Class Reference

A skinned and jointed 3D HandModel. More...

Inheritance diagram for Leap.Unity.RiggedHand:
Leap.Unity.HandModel Leap.Unity.HandModelBase

Public Member Functions

override 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...
 
override void InitHand ()
 
override void UpdateHand ()
 
void SetupRiggedHand ()
 
void AutoRigRiggedHand (Transform palm, Transform finger1, Transform finger2)
 
- Public Member Functions inherited from Leap.Unity.HandModel
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 ()
 
- Public Member Functions inherited from Leap.Unity.HandModelBase
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...
 

Static Public Member Functions

static Vector3 CalculateZeroedVector (Vector3 vectorToZero)
 

Public Attributes

bool modelPalmAtLeapWrist = true
 
bool useMetaCarpals
 
Vector3 modelFingerPointing = new Vector3(0, 0, 0)
 
Vector3 modelPalmFacing = new Vector3(0, 0, 0)
 
- Public Attributes inherited from Leap.Unity.HandModel
float handModelPalmWidth = 0.085f
 
FingerModel[] fingers = new FingerModel[NUM_FINGERS]
 
Transform palm
 
Transform forearm
 
Transform wristJoint
 
Transform elbowJoint
 
- Public Attributes inherited from Leap.Unity.HandModelBase
HandModelManager.ModelGroup group
 

Properties

override ModelType HandModelType [get]
 
bool deformPositionsInFingers [get, set]
 
bool scaleLastFingerBones [get, set]
 
Quaternion userBoneRotation [get]
 Rotation derived from the modelFingerPointing and modelPalmFacing vectors in the RiggedHand inspector. More...
 
- Properties inherited from Leap.Unity.HandModel
override Chirality Handedness [get, set]
 
abstract override ModelType HandModelType [get]
 
- Properties inherited from Leap.Unity.HandModelBase
bool IsTracked [get]
 
abstract Chirality Handedness [get, set]
 
abstract ModelType HandModelType [get]
 

Additional Inherited Members

- Static Public Attributes inherited from Leap.Unity.HandModel
const int NUM_FINGERS = 5
 
- Protected Attributes inherited from Leap.Unity.HandModel
Hand hand_
 
- Events inherited from Leap.Unity.HandModelBase
Action OnBegin
 
Action OnFinish
 
Action OnUpdate
 Called directly after the HandModelBase's UpdateHand(). More...
 

Detailed Description

A skinned and jointed 3D HandModel.

Definition at line 20 of file RiggedHand.cs.

Member Function Documentation

◆ AutoRigRiggedHand()

void Leap.Unity.RiggedHand.AutoRigRiggedHand ( Transform  palm,
Transform  finger1,
Transform  finger2 
)

Sets up the rigged hand if RiggedFinger scripts have already been assigned using Mecanim values.

Definition at line 141 of file RiggedHand.cs.

◆ CalculateZeroedVector()

static Vector3 Leap.Unity.RiggedHand.CalculateZeroedVector ( Vector3  vectorToZero)
static

Finds nearest cardinal vector to a vector

Definition at line 266 of file RiggedHand.cs.

◆ InitHand()

override void Leap.Unity.RiggedHand.InitHand ( )
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.HandModel.

Definition at line 95 of file RiggedHand.cs.

◆ SetupRiggedHand()

void Leap.Unity.RiggedHand.SetupRiggedHand ( )

Sets up the rigged hand by finding base of each finger by name

Definition at line 129 of file RiggedHand.cs.

◆ SupportsEditorPersistence()

override bool Leap.Unity.RiggedHand.SupportsEditorPersistence ( )
virtual

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.

Reimplemented from Leap.Unity.HandModelBase.

Definition at line 23 of file RiggedHand.cs.

◆ UpdateHand()

override void Leap.Unity.RiggedHand.UpdateHand ( )
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.HandModel.

Definition at line 101 of file RiggedHand.cs.

Member Data Documentation

◆ modelFingerPointing

Vector3 Leap.Unity.RiggedHand.modelFingerPointing = new Vector3(0, 0, 0)

Definition at line 78 of file RiggedHand.cs.

◆ modelPalmAtLeapWrist

bool Leap.Unity.RiggedHand.modelPalmAtLeapWrist = true

Definition at line 57 of file RiggedHand.cs.

◆ modelPalmFacing

Vector3 Leap.Unity.RiggedHand.modelPalmFacing = new Vector3(0, 0, 0)

Definition at line 83 of file RiggedHand.cs.

◆ useMetaCarpals

bool Leap.Unity.RiggedHand.useMetaCarpals

Definition at line 61 of file RiggedHand.cs.

Property Documentation

◆ deformPositionsInFingers

bool Leap.Unity.RiggedHand.deformPositionsInFingers
getset

Definition at line 29 of file RiggedHand.cs.

◆ HandModelType

override ModelType Leap.Unity.RiggedHand.HandModelType
get

Definition at line 22 of file RiggedHand.cs.

◆ scaleLastFingerBones

bool Leap.Unity.RiggedHand.scaleLastFingerBones
getset

Definition at line 47 of file RiggedHand.cs.

◆ userBoneRotation

Quaternion Leap.Unity.RiggedHand.userBoneRotation
get

Rotation derived from the modelFingerPointing and modelPalmFacing vectors in the RiggedHand inspector.

Definition at line 87 of file RiggedHand.cs.


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