Tanoda
Leap.Unity.Interaction.KabschGraspedPose Class Reference

This pose handler is the default implementation of IGraspedPoseHandler provided by the Interaction Engine and is most likely the only implementation you will need. It uses a Kabsch solve from frame to frame based on the points at which any grasping controller are grasping the interaction object to determine where the object should move and rotate in the grasp. Note that IGraspedPoseHandlers only determine the target position and rotation of a held object; actually moving the object is the domain of an IGraspedMovementHandler. More...

Inheritance diagram for Leap.Unity.Interaction.KabschGraspedPose:
Leap.Unity.Interaction.IGraspedPoseHandler

Classes

class  PosePointCollection
 

Public Types

enum  SolveMethod { SixDegreeSolve , PivotAroundOrigin }
 

Public Member Functions

 KabschGraspedPose (InteractionBehaviour interactionObj)
 
void AddController (InteractionController controller)
 Called when a new InteractionController begins grasping a certain object. The controller or Leap hand should be included in the held pose calculation. More...
 
void RemoveController (InteractionController controller)
 Called when an InteractionController stops grasping a certain object; the controller should no longer be included in the held pose calculation. More...
 
void ClearControllers ()
 Called e.g. if the InteractionBehaviour is set not to move while being grasped; this should clear any hands to be included in the grasping position calculation. More...
 
void GetGraspedPosition (out Vector3 newPosition, out Quaternion newRotation)
 Calculate the best holding position and orientation given the current state of all InteractionControllers (added via AddController()). More...
 
void AddController (InteractionController controller)
 Called when a new InteractionController begins grasping a certain object. The controller or Leap hand should be included in the held pose calculation. More...
 
void RemoveController (InteractionController controller)
 Called when an InteractionController stops grasping a certain object; the controller should no longer be included in the held pose calculation. More...
 
void ClearControllers ()
 Called e.g. if the InteractionBehaviour is set not to move while being grasped; this should clear any hands to be included in the grasping position calculation. More...
 
void GetGraspedPosition (out Vector3 position, out Quaternion rotation)
 Calculate the best holding position and orientation given the current state of all InteractionControllers (added via AddController()). More...
 

Static Public Attributes

const int NUM_FINGERS = 5
 
const int NUM_BONES = 4
 

Detailed Description

This pose handler is the default implementation of IGraspedPoseHandler provided by the Interaction Engine and is most likely the only implementation you will need. It uses a Kabsch solve from frame to frame based on the points at which any grasping controller are grasping the interaction object to determine where the object should move and rotate in the grasp. Note that IGraspedPoseHandlers only determine the target position and rotation of a held object; actually moving the object is the domain of an IGraspedMovementHandler.

Definition at line 24 of file KabschGraspedPose.cs.

Member Enumeration Documentation

◆ SolveMethod

Enumerator
SixDegreeSolve 
PivotAroundOrigin 

Definition at line 28 of file KabschGraspedPose.cs.

Constructor & Destructor Documentation

◆ KabschGraspedPose()

Leap.Unity.Interaction.KabschGraspedPose.KabschGraspedPose ( InteractionBehaviour  interactionObj)

Definition at line 43 of file KabschGraspedPose.cs.

Member Function Documentation

◆ AddController()

void Leap.Unity.Interaction.KabschGraspedPose.AddController ( InteractionController  controller)

Called when a new InteractionController begins grasping a certain object. The controller or Leap hand should be included in the held pose calculation.

Implements Leap.Unity.Interaction.IGraspedPoseHandler.

Definition at line 51 of file KabschGraspedPose.cs.

◆ ClearControllers()

void Leap.Unity.Interaction.KabschGraspedPose.ClearControllers ( )

Called e.g. if the InteractionBehaviour is set not to move while being grasped; this should clear any hands to be included in the grasping position calculation.

Implements Leap.Unity.Interaction.IGraspedPoseHandler.

Definition at line 71 of file KabschGraspedPose.cs.

◆ GetGraspedPosition()

void Leap.Unity.Interaction.KabschGraspedPose.GetGraspedPosition ( out Vector3  position,
out Quaternion  rotation 
)

Calculate the best holding position and orientation given the current state of all InteractionControllers (added via AddController()).

Implements Leap.Unity.Interaction.IGraspedPoseHandler.

Definition at line 78 of file KabschGraspedPose.cs.

◆ RemoveController()

void Leap.Unity.Interaction.KabschGraspedPose.RemoveController ( InteractionController  controller)

Called when an InteractionController stops grasping a certain object; the controller should no longer be included in the held pose calculation.

Implements Leap.Unity.Interaction.IGraspedPoseHandler.

Definition at line 63 of file KabschGraspedPose.cs.

Member Data Documentation

◆ NUM_BONES

const int Leap.Unity.Interaction.KabschGraspedPose.NUM_BONES = 4
static

Definition at line 26 of file KabschGraspedPose.cs.

◆ NUM_FINGERS

const int Leap.Unity.Interaction.KabschGraspedPose.NUM_FINGERS = 5
static

Definition at line 25 of file KabschGraspedPose.cs.


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