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

Especifies a surface around a Snappable in which a hand can snap to. SnapSurfaces are an optional property of SnapPoints and they actually define all the valid points for the Grip of the hand to snap to the object with the same HandPose. More...

Inheritance diagram for HandPosing.SnapSurfaces.SnapSurface:
HandPosing.SnapSurfaces.BoxSurface HandPosing.SnapSurfaces.CylinderSurface HandPosing.SnapSurfaces.SphereSurface

Public Member Functions

virtual Pose MirrorPose (Pose pose)
 Method for mirroring a Pose around the surface. Different surfaces will prefer mirroring along different axis. More...
 
abstract HandPose InvertedPose (HandPose pose)
 STUB: Inverts a hand pose to an upside-down position. More...
 
abstract Vector3 NearestPointInSurface (Vector3 targetPosition)
 The nearest position at the surface from a given position. More...
 
abstract Pose MinimalRotationPoseAtSurface (Pose userPose, Pose snapPose)
 Calculates a valid pose at the surface with the most similar rotation possible to the user's hand More...
 
abstract Pose MinimalTranslationPoseAtSurface (Pose userPose, Pose snapPose)
 Calculates a valid pose at the surface with the most similar position possible to the user's hand More...
 

Public Attributes

Transform relativeTo
 Object to which the surface refers to. More...
 

Properties

virtual SnapSurfaceData Data [get, set]
 Getter for the data-only version of this surface. Used so it can be stored when created at Play-Mode. More...
 
Transform GripPoint [get]
 Valid point at which the hand can snap, typically the SnapPoint position itself. More...
 

Detailed Description

Especifies a surface around a Snappable in which a hand can snap to. SnapSurfaces are an optional property of SnapPoints and they actually define all the valid points for the Grip of the hand to snap to the object with the same HandPose.

Snap Surfaces typically come with Inspector and Handles to modify their properties, this is the recommended way to edit the values as editting the numbers directly can be very error-prone.

Member Function Documentation

◆ InvertedPose()

abstract HandPose HandPosing.SnapSurfaces.SnapSurface.InvertedPose ( HandPose  pose)
pure virtual

STUB: Inverts a hand pose to an upside-down position.

Parameters
poseThe hand pose to be inverted
Returns
An upside-down version of the given pose.

Implemented in HandPosing.SnapSurfaces.SphereSurface, HandPosing.SnapSurfaces.CylinderSurface, and HandPosing.SnapSurfaces.BoxSurface.

◆ MinimalRotationPoseAtSurface()

abstract Pose HandPosing.SnapSurfaces.SnapSurface.MinimalRotationPoseAtSurface ( Pose  userPose,
Pose  snapPose 
)
pure virtual

Calculates a valid pose at the surface with the most similar rotation possible to the user's hand

Parameters
userPoseThe user's hand pose
snapPoseThe pose for the snap point
Returns
A valid pose at the surface

Implemented in HandPosing.SnapSurfaces.SphereSurface, HandPosing.SnapSurfaces.CylinderSurface, and HandPosing.SnapSurfaces.BoxSurface.

◆ MinimalTranslationPoseAtSurface()

abstract Pose HandPosing.SnapSurfaces.SnapSurface.MinimalTranslationPoseAtSurface ( Pose  userPose,
Pose  snapPose 
)
pure virtual

Calculates a valid pose at the surface with the most similar position possible to the user's hand

Parameters
userPoseThe user's hand pose
snapPoseThe pose for the snap point
Returns
A valid pose at the surface

Implemented in HandPosing.SnapSurfaces.SphereSurface, HandPosing.SnapSurfaces.CylinderSurface, and HandPosing.SnapSurfaces.BoxSurface.

◆ MirrorPose()

virtual Pose HandPosing.SnapSurfaces.SnapSurface.MirrorPose ( Pose  pose)
virtual

Method for mirroring a Pose around the surface. Different surfaces will prefer mirroring along different axis.

Parameters
poseThe Pose to be mirrored.
Returns
A new pose mirrored at this surface.

Reimplemented in HandPosing.SnapSurfaces.SphereSurface, HandPosing.SnapSurfaces.CylinderSurface, and HandPosing.SnapSurfaces.BoxSurface.

◆ NearestPointInSurface()

abstract Vector3 HandPosing.SnapSurfaces.SnapSurface.NearestPointInSurface ( Vector3  targetPosition)
pure virtual

The nearest position at the surface from a given position.

Parameters
targetPositionThe position to measure from at world coordinates.
Returns
A valid position at the surface in world coordinates.

Implemented in HandPosing.SnapSurfaces.SphereSurface, HandPosing.SnapSurfaces.CylinderSurface, and HandPosing.SnapSurfaces.BoxSurface.

Member Data Documentation

◆ relativeTo

Transform HandPosing.SnapSurfaces.SnapSurface.relativeTo

Object to which the surface refers to.

Property Documentation

◆ Data

virtual SnapSurfaceData HandPosing.SnapSurfaces.SnapSurface.Data
getset

Getter for the data-only version of this surface. Used so it can be stored when created at Play-Mode.

◆ GripPoint

Transform HandPosing.SnapSurfaces.SnapSurface.GripPoint
getprotected

Valid point at which the hand can snap, typically the SnapPoint position itself.


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