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

A merge between a HandPose and the score indicating how good it is for snapping an object. More...

Public Member Functions

 ScoredHandPose (HandPose pose, float score, SnapDirection direction)
 Default constructor. More...
 

Static Public Member Functions

static ScoredHandPose Null ()
 Default empty ScoredHandPose. More...
 
static bool IsNull (ScoredHandPose pose)
 Check if the given ScoredHandPose is valid. More...
 
static ? ScoredHandPose Lerp (ScoredHandPose from, ScoredHandPose to, float t)
 Interpolate between two ScoredHandPose. Both ScoredHandPoses must have the same direction. This method does not only moves the hands, but also adjusts the score linearly. More...
 

Properties

HandPose Pose [get]
 The HandPose beign scored. More...
 
SnapDirection Direction [get]
 The direction in which the snap is happening. More...
 
float Score [get]
 The score of the snap. -1 for an invalid pose 0 for a bad snapping (too far away) 1 for a perfect snapping. More...
 

Detailed Description

A merge between a HandPose and the score indicating how good it is for snapping an object.

Constructor & Destructor Documentation

◆ ScoredHandPose()

HandPosing.ScoredHandPose.ScoredHandPose ( HandPose  pose,
float  score,
SnapDirection  direction 
)

Default constructor.

Parameters
poseThe HandPose to measure.
scoreScore of the snap.
directionDirection of the snap.

Member Function Documentation

◆ IsNull()

static bool HandPosing.ScoredHandPose.IsNull ( ScoredHandPose  pose)
static

Check if the given ScoredHandPose is valid.

Parameters
poseThe ScoredHandPose to check.
Returns
True for an invalid pose.

◆ Lerp()

static ? ScoredHandPose HandPosing.ScoredHandPose.Lerp ( ScoredHandPose  from,
ScoredHandPose  to,
float  t 
)
static

Interpolate between two ScoredHandPose. Both ScoredHandPoses must have the same direction. This method does not only moves the hands, but also adjusts the score linearly.

Parameters
fromThe base ScoredHandPose to interpolate from.
toThe target ScoredHandPose to interpolate to.
tThe interpolation factor, 0 for the base, 1 for the target value.
Returns
A ScoredHandPose between base and target, null if they are not interpolable.

◆ Null()

static ScoredHandPose HandPosing.ScoredHandPose.Null ( )
static

Default empty ScoredHandPose.

Returns
A ScoredHandPose with invalid score.

Property Documentation

◆ Direction

SnapDirection HandPosing.ScoredHandPose.Direction
get

The direction in which the snap is happening.

◆ Pose

HandPose HandPosing.ScoredHandPose.Pose
get

The HandPose beign scored.

◆ Score

float HandPosing.ScoredHandPose.Score
get

The score of the snap. -1 for an invalid pose 0 for a bad snapping (too far away) 1 for a perfect snapping.


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