HandPosing
A tool for quickly authoring hand poses to objects in VR using hand-tracking
HandPosing.HandPuppet Class Reference

This class controls the representation of a hand (typically a skin-mesh renderer) by moving its position/rotation and the rotations of the bones that compose it. More...

Inheritance diagram for HandPosing.HandPuppet:

Public Member Functions

void LerpBones (List< BonePose > bones, float weight)
 Rotates the bones of the hand towards the given ones using interpolation. More...
 
void LerpGripOffset (HandPose pose, float weight, Transform relativeTo)
 Moves the hand positing/rotation towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform. More...
 
void LerpGripOffset (Pose pose, float weight, Transform relativeTo)
 Moves the hand at a given pose towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform. More...
 
HandPose TrackedPose (Transform relativeTo, bool includeBones=false)
 Gets the current represented hand pose oriented in relation to a given object. More...
 

Public Attributes

System.Action OnPoseBeforeUpdate
 Callback before applying the puppeting to the hand representation. More...
 
System.Action OnPoseUpdated
 Callback after applying the puppeting to the hand representation. More...
 

Properties

List< BoneMapBones [get]
 General getter for the bones of the hand. More...
 
float Scale [get]
 Current scale of the represented hand. More...
 
Transform Grip [get]
 General getter for the grip point of the hand. More...
 
bool IsTrackingHands [get]
 True if the user is using hand-tracking, false if using controllers. More...
 
Pose TrackedGripOffset [get]
 Relative pose of the representated grip from the tracked hand. More...
 
Pose TrackedGripPose [get]
 World rotation of the tracked More...
 

Detailed Description

This class controls the representation of a hand (typically a skin-mesh renderer) by moving its position/rotation and the rotations of the bones that compose it.

The data that drives this puppet could come from a hand-tracking system but sometimes it is overriden by the snapping system. In that matter, it is also important to note the difference between tracked data and its representation, sometimes they might differ when the representation is overriden.

Member Function Documentation

◆ LerpBones()

void HandPosing.HandPuppet.LerpBones ( List< BonePose bones,
float  weight 
)

Rotates the bones of the hand towards the given ones using interpolation.

Parameters
bonesThe target bone rotations.
weightInterpolation factor for the bones. 0 for staying with the current values, 1 for fully overriding with the new ones.

◆ LerpGripOffset() [1/2]

void HandPosing.HandPuppet.LerpGripOffset ( HandPose  pose,
float  weight,
Transform  relativeTo 
)

Moves the hand positing/rotation towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform.

Parameters
poseThe relative target position for the grip point of the hand
weightInterpolation factor, 0 for not changing the hand, 1 for fully alligning the grip point with the given pose.
relativeToThe reference transform in which the pose is provided.

◆ LerpGripOffset() [2/2]

void HandPosing.HandPuppet.LerpGripOffset ( Pose  pose,
float  weight,
Transform  relativeTo 
)

Moves the hand at a given pose towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform.

Parameters
poseThe relative target position for the grip point of the hand
weightInterpolation factor, 0 for not changing the hand, 1 for fully alligning the grip point with the given pose.
relativeToThe reference transform in which the pose is provided.

◆ TrackedPose()

HandPose HandPosing.HandPuppet.TrackedPose ( Transform  relativeTo,
bool  includeBones = false 
)

Gets the current represented hand pose oriented in relation to a given object.

Parameters
relativeToThe object from which to obtain the pose. Typically an object that is going to be grabbed.
includeBonesTrue for including all the bones data in the result (default False)
Returns
A new HandPose

Member Data Documentation

◆ OnPoseBeforeUpdate

System.Action HandPosing.HandPuppet.OnPoseBeforeUpdate

Callback before applying the puppeting to the hand representation.

◆ OnPoseUpdated

System.Action HandPosing.HandPuppet.OnPoseUpdated

Callback after applying the puppeting to the hand representation.

Property Documentation

◆ Bones

List<BoneMap> HandPosing.HandPuppet.Bones
get

General getter for the bones of the hand.

◆ Grip

Transform HandPosing.HandPuppet.Grip
get

General getter for the grip point of the hand.

◆ IsTrackingHands

bool HandPosing.HandPuppet.IsTrackingHands
get

True if the user is using hand-tracking, false if using controllers.

◆ Scale

float HandPosing.HandPuppet.Scale
get

Current scale of the represented hand.

◆ TrackedGripOffset

Pose HandPosing.HandPuppet.TrackedGripOffset
get

Relative pose of the representated grip from the tracked hand.

◆ TrackedGripPose

Pose HandPosing.HandPuppet.TrackedGripPose
get

World rotation of the tracked


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