HandPosing
A tool for quickly authoring hand poses to objects in VR using hand-tracking
HandPosing.SnapRecording.BaseSnapPoint Class Referenceabstract

A SnapPoint indicates the properties about how a hand can snap to an object. The most important is the position/rotation and finger rotations for the hand, but it can also contain extra information like a valid holding surface (instead of just a single point) or a visual representation (using a hand-ghost) More...

Inheritance diagram for HandPosing.SnapRecording.BaseSnapPoint:
HandPosing.SnapRecording.SnapPoint HandPosing.SnapRecording.SnapPointInterpolator

Public Member Functions

abstract ScoredHandPose CalculateBestPose (HandPose userPose, float? scoreWeight=null, SnapDirection direction=SnapDirection.Any, float scale=1f)
 Find the best valid hand-pose at this snap point. Remember that a snap point can actually have a whole surface the user can snap to. In some cases it can also have different hand scales with their surfaces, it will interpolate between the best available matches. More...
 
abstract Vector3 NearestInSurface (Vector3 worldPoint, float scale=1f)
 Find the closes point at the snap surface. If there is no surface, the SnapPoint position itself is returned. If multiple scales are available, it will interpolate between the closest matches. More...
 
abstract void DestroyImmediate ()
 Destroys this snap point, to be called from the Inspector only. More...
 

Protected Attributes

Transform relativeTo
 The transform of the object this snap point refers to. Typically the parent. More...
 
bool snapsBack
 If true, the hand can be overriden to reach the object, and once it is grabbed it will move back (now holding it) to the user-tracking position. More...
 
float slideThresold = 0f
 Indicates how firmly the grab strength must be so the hand can slide. Normalised, a value of 1 will always slide, a value of 0.5 will start sliding only when the grab is half-released. More...
 

Properties

Transform RelativeTo [get]
 General getter for the transform of the object this snap point refers to More...
 
bool SnapsBack [get]
 General getter indicating if the hand can reach for the object and then move back to the user-tracked position. More...
 
float SlideThresold [get]
 General getter indicatig how firmly to held the object so the hand does not slide throught the surface. More...
 

Detailed Description

A SnapPoint indicates the properties about how a hand can snap to an object. The most important is the position/rotation and finger rotations for the hand, but it can also contain extra information like a valid holding surface (instead of just a single point) or a visual representation (using a hand-ghost)

Member Function Documentation

◆ CalculateBestPose()

abstract ScoredHandPose HandPosing.SnapRecording.BaseSnapPoint.CalculateBestPose ( HandPose  userPose,
float?  scoreWeight = null,
SnapDirection  direction = SnapDirection.Any,
float  scale = 1f 
)
pure virtual

Find the best valid hand-pose at this snap point. Remember that a snap point can actually have a whole surface the user can snap to. In some cases it can also have different hand scales with their surfaces, it will interpolate between the best available matches.

Parameters
userPoseHand pose to compare to the snap point.
scoreWeightHow much to score the position or the rotation difference.
directionConsider only poses at the surface using the provided direction.
scaleThe desired scale of the hand to compare.
Returns
The most similar valid HandPose at this SnapPoint

Implemented in HandPosing.SnapRecording.SnapPointInterpolator, and HandPosing.SnapRecording.SnapPoint.

◆ DestroyImmediate()

abstract void HandPosing.SnapRecording.BaseSnapPoint.DestroyImmediate ( )
pure virtual

Destroys this snap point, to be called from the Inspector only.

Implemented in HandPosing.SnapRecording.SnapPointInterpolator, and HandPosing.SnapRecording.SnapPoint.

◆ NearestInSurface()

abstract Vector3 HandPosing.SnapRecording.BaseSnapPoint.NearestInSurface ( Vector3  worldPoint,
float  scale = 1f 
)
pure virtual

Find the closes point at the snap surface. If there is no surface, the SnapPoint position itself is returned. If multiple scales are available, it will interpolate between the closest matches.

Parameters
worldPointPoint to measure distane to the surface
scaleThe desired scale of the hand.
Returns
The nearest point in World coordinates

Implemented in HandPosing.SnapRecording.SnapPointInterpolator, and HandPosing.SnapRecording.SnapPoint.

Member Data Documentation

◆ relativeTo

Transform HandPosing.SnapRecording.BaseSnapPoint.relativeTo
protected

The transform of the object this snap point refers to. Typically the parent.

◆ slideThresold

float HandPosing.SnapRecording.BaseSnapPoint.slideThresold = 0f
protected

Indicates how firmly the grab strength must be so the hand can slide. Normalised, a value of 1 will always slide, a value of 0.5 will start sliding only when the grab is half-released.

It is recommended to use this only with grabs based on physics Joints.

◆ snapsBack

bool HandPosing.SnapRecording.BaseSnapPoint.snapsBack
protected

If true, the hand can be overriden to reach the object, and once it is grabbed it will move back (now holding it) to the user-tracking position.

Property Documentation

◆ RelativeTo

Transform HandPosing.SnapRecording.BaseSnapPoint.RelativeTo
get

General getter for the transform of the object this snap point refers to

◆ SlideThresold

float HandPosing.SnapRecording.BaseSnapPoint.SlideThresold
get

General getter indicatig how firmly to held the object so the hand does not slide throught the surface.

◆ SnapsBack

bool HandPosing.SnapRecording.BaseSnapPoint.SnapsBack
get

General getter indicating if the hand can reach for the object and then move back to the user-tracked position.


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