Class Leap::HandsModule::HandModelManager¶
- class Leap.HandsModule.HandModelManager : public MonoBehaviour¶
A script to manage the active hand models in the scene
Public Functions
- void RegisterAllUnregisteredHandModels ()¶
Find any unregistered hand models, and register them with the hand model manager
- void RegisterHandModel (HandModelBase handModel, bool attemptToRegisterPair = true)¶
Registers a hand model with the Hand Model Manager.
- Param handModel
The hand model to pair
- Param attemptToRegisterPair
if true, Hand Model Manager will attempt to pair it with another hand model
- void UnregisterHandModel (HandModelBase handModel)¶
Unregisters a hand with the Hand Model Manager. If the HandModelPair no longer has a left and right hand it will be removed from the HandModelPair list
- Param handModel
The hand model to unregister
- List<HandModelBase> GetAllActiveRegisteredHands ()¶
Returns all active & registered hand models This includes hands whose EnableDisable is not frozen, or are frozen in an active state
- Return
Returns all active & registered hand models
- bool TryGetHandModelPair (int index, out HandModelPair handModelPair)¶
Returns a hand model pair by index, if given a valid index
- Param index
The index of the hand model pair
- Param handModelPair
The hand model pair to be returned
- Return
Returns true if the pair have been found, and false if not
- bool TryGetHandModelPair (string handModelPairID, out HandModelPair handModelPair)
Returns a hand model pair by index, if given a valid index
- Param handModelPairID
The handModelPairID of the hand model pair
- Param handModelPair
The hand model pair to be returned
- Return
Returns true if the pair have been found, and false if not
- bool TryGetHandModel (Chirality chirality, int index, out HandModelBase handModelBase)¶
Returns a hand model by index, if given a valid index
- Param chirality
The chirality of the hand model
- Param index
The index of the hand model
- Param handModelBase
The hand model to be returned
- Return
Returns true if the pair have been found, and false if not
- bool TryGetHandModel (Chirality chirality, string handModelPairID, out HandModelBase handModelBase)
Returns a hand model by index, if given a valid index
- Param chirality
The chirality of the hand model
- Param handModelPairID
The handModelPairID of the hand model
- Param handModelBase
The hand model to be returned
- Return
Returns true if the pair have been found, and false if not
- void EnableHandModelPair (int index, bool disableOtherHandModels = true)¶
Enable a hand model pair in the scene
- Param index
The index of the pair to enable
- Param disableOtherHandModels
If true, disable all other active hands
- void EnableHandModelPair (string handModelPairID, bool disableOtherHandModels = true)
Enable a hand model pair in the scene
- Param handModelPairID
The string id of the hand model pair to enable
- Param disableOtherHandModels
If true, disable all other active hand models
- void EnableHandModel (Chirality chirality, int index, bool disableOtherHandModelsOfSameChirality = true)¶
Enable a single hand model in the scene, based on chirality
- Param chirality
The chirality to enable
- Param index
The index of the hand model to enable
- Param disableOtherHandModelsOfSameChirality
If true, disable all other active hand models of the same chirality
- void EnableHandModelPair (Chirality chirality, string handModelPairID, bool disableOtherHandModelsOfSameChirality = true)
Enable a single hand model in the scene, based on chirality
- Param chirality
The chirality to enable
- Param handModelPairID
The pair id of the hand model to enable
- Param disableOtherHandModelsOfSameChirality
If true, disable all other active hand models of the same chirality
- void DisableHandModelPair (int index)¶
Disables a hand model pair
- Param index
The index of the pair to disable
- void DisableHandModelPair (string handModelPairId)
Disables a hand model pair
- Param handModelPairId
The hand model pair id of the pair to disable
- void DisableHandModel (Chirality chirality, int index)¶
Disables a hand model based on its chirality
- Param chirality
The chirality by which to disable
- Param index
The index of the model to disable
- void DisableHandModel (Chirality chirality, string handModelPairId)
Disables a hand model based on its chirality
- Param chirality
The chirality by which to disable
- Param handModelPairId
The model pair id of the model to disable
- class HandModelPair¶