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

This SnapPoint is actually a Composition of several basic SnapPoints that can be interpolated in between according to the hand scale. More...

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

Public Member Functions

override 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...
 
override 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...
 
override void DestroyImmediate ()
 Destroys this snap point, to be called from the Inspector only. More...
 

Additional Inherited Members

- Protected Attributes inherited from HandPosing.SnapRecording.BaseSnapPoint
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 inherited from HandPosing.SnapRecording.BaseSnapPoint
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

This SnapPoint is actually a Composition of several basic SnapPoints that can be interpolated in between according to the hand scale.

If enabling hand scaling, create several normal SnapPoints at different scales for the same pose, and then group them together with this class before assigning it to the Snappable, so the system can interpolate between all of them depending on the size of the user's hand.

Member Function Documentation

◆ CalculateBestPose()

override ScoredHandPose HandPosing.SnapRecording.SnapPointInterpolator.CalculateBestPose ( HandPose  userPose,
float?  scoreWeight = null,
SnapDirection  direction = SnapDirection.Any,
float  scale = 1f 
)
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

Implements HandPosing.SnapRecording.BaseSnapPoint.

◆ DestroyImmediate()

override void HandPosing.SnapRecording.SnapPointInterpolator.DestroyImmediate ( )
virtual

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

Implements HandPosing.SnapRecording.BaseSnapPoint.

◆ NearestInSurface()

override Vector3 HandPosing.SnapRecording.SnapPointInterpolator.NearestInSurface ( Vector3  worldPoint,
float  scale = 1f 
)
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

Implements HandPosing.SnapRecording.BaseSnapPoint.


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