The HandModelManager manages a pool of HandModelBases and makes HandRepresentations when a it detects a Leap Hand from its configured LeapProvider.
More...
The HandModelManager manages a pool of HandModelBases and makes HandRepresentations when a it detects a Leap Hand from its configured LeapProvider.
When a HandRepresentation is created, a HandModelBase is removed from the pool. When a HandRepresentation is finished, its HandModelBase is returned to the pool.
This class was formerly known as HandPool.
Definition at line 31 of file HandModelManager.cs.
◆ AddNewGroup()
◆ DisableGroup()
void Leap.Unity.HandModelManager.DisableGroup |
( |
string |
groupName | ) |
|
DisableGroup finds and removes the ModelGroup's HandModelBases from their HandRepresentations, returns them to their ModelGroup and sets the groups IsEnabled to false.
- Parameters
-
groupName | Takes a string that matches the ModelGroup's groupName serialized in the Inspector |
Definition at line 402 of file HandModelManager.cs.
◆ EnableGroup()
void Leap.Unity.HandModelManager.EnableGroup |
( |
string |
groupName | ) |
|
EnableGroup finds suitable HandRepresentations and adds HandModelBases from the ModelGroup, returns them to their ModelGroup and sets the groups IsEnabled to true.
- Parameters
-
groupName | Takes a string that matches the ModelGroup's groupName serialized in the Inspector |
Definition at line 373 of file HandModelManager.cs.
◆ GetHandModel< T >()
T Leap.Unity.HandModelManager.GetHandModel< T > |
( |
int |
handId | ) |
|
◆ MakeHandRepresentation()
◆ OnDisable()
virtual void Leap.Unity.HandModelManager.OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnEnable()
virtual void Leap.Unity.HandModelManager.OnEnable |
( |
| ) |
|
|
protectedvirtual |
◆ OnFixedFrame()
virtual void Leap.Unity.HandModelManager.OnFixedFrame |
( |
Frame |
frame | ) |
|
|
protectedvirtual |
◆ OnUpdateFrame()
virtual void Leap.Unity.HandModelManager.OnUpdateFrame |
( |
Frame |
frame | ) |
|
|
protectedvirtual |
◆ RemoveGroup()
void Leap.Unity.HandModelManager.RemoveGroup |
( |
string |
groupName | ) |
|
◆ RemoveHandRepresentation()
void Leap.Unity.HandModelManager.RemoveHandRepresentation |
( |
HandRepresentation |
handRepresentation | ) |
|
◆ ReturnToPool()
void Leap.Unity.HandModelManager.ReturnToPool |
( |
HandModelBase |
model | ) |
|
◆ ToggleGroup()
void Leap.Unity.HandModelManager.ToggleGroup |
( |
string |
groupName | ) |
|
◆ UpdateHandRepresentations()
Updates HandRepresentations based in the specified HandRepresentation Dictionary. Active HandRepresentation instances are updated if the hand they represent is still present in the Provider's CurrentFrame; otherwise, the HandRepresentation is removed. If new Leap Hand objects are present in the Leap HandRepresentation Dictionary, new HandRepresentations are created and added to the dictionary.
- Parameters
-
all_hand_reps | = A dictionary of Leap Hand ID's with a paired HandRepresentation |
modelType | Filters for a type of hand model, for example, physics or graphics hands. |
frame | The Leap Frame containing Leap Hand data for each currently tracked hand |
Mark-and-sweep to finish unused HandRepresentations
Initialize toBeDeleted with a value to be deleted
Inform the representation that we will no longer be giving it any hand updates because the corresponding hand has gone away
Definition at line 83 of file HandModelManager.cs.
◆ graphicsEnabled
bool Leap.Unity.HandModelManager.graphicsEnabled = true |
|
protected |
◆ graphicsHandReps
◆ physicsEnabled
bool Leap.Unity.HandModelManager.physicsEnabled = true |
|
protected |
◆ physicsHandReps
◆ GraphicsEnabled
bool Leap.Unity.HandModelManager.GraphicsEnabled |
|
getset |
◆ leapProvider
◆ PhysicsEnabled
bool Leap.Unity.HandModelManager.PhysicsEnabled |
|
getset |
The documentation for this class was generated from the following file: