API reference

HandGrabPose Class

Extends MonoBehaviour
The HandGrabPose defines the local point in an object to which the grip point of a HandGrabInteractor should align.
It can also contain information about the final pose of the hand for perfect alignment as well as a surface that indicates the valid positions for the point.

Fields

RelativeTo : Transform
Reference transform of the HandGrabPose.
This is the transform relative to which many fundamental calculations are performed.
Signature
Transform Oculus.Interaction.HandGrab.HandGrabPose.RelativeTo

Properties

HandPose : HandPose
[Get]
The HandGrab.HandPose a hand visual should adopt when grabbing an interactable equipped with this HandGrabPose.
Signature
HandPose Oculus.Interaction.HandGrab.HandGrabPose.HandPose
RelativePose : Pose
[Get]
Pose of the HandGrabPose relative to its reference transform.
Signature
Pose Oculus.Interaction.HandGrab.HandGrabPose.RelativePose
RelativeScale : float
[Get]
Returns the current scale of the HandGrabPose relative to its reference transform.
This value is estimated based the RelativeTo transform's scale in its local X dimension; this estimate is not guaranteed to be accurate, particularly under arbitrary rotations and skewing scales.
Signature
float Oculus.Interaction.HandGrab.HandGrabPose.RelativeScale
SnapSurface : IGrabSurface
[Get]
The IGrabSurface containing information to help hand visuals pose themselves when grabbing.
This property is primarily used by internal HandGrabPose calculations and by Editor-based pose authoring tools.
Signature
IGrabSurface Oculus.Interaction.HandGrab.HandGrabPose.SnapSurface

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.HandGrab.HandGrabPose.Awake()
Returns
void
Reset ()
Signature
virtual void Oculus.Interaction.HandGrab.HandGrabPose.Reset()
Returns
void

Methods

CalculateBestPose ( userPose , handedness , scoringModifier , relativeTo , result )
Signature
virtual bool Oculus.Interaction.HandGrab.HandGrabPose.CalculateBestPose(Pose userPose, Handedness handedness, PoseMeasureParameters scoringModifier, Transform relativeTo, ref HandGrabResult result)
Parameters
userPose: Pose  The current pose of the user
handedness: Handedness  The handedness of the grab
scoringModifier: PoseMeasureParameters  PoseMeasureParameters for score modification
relativeTo: Transform  The relative transform
result: ref HandGrabResult  Out parameter for the calculated pose
Returns
bool  True always (this obsolete method always returns a valid result)
CalculateBestPose ( userPose , offset , relativeTo , handedness , scoringModifier , result )
Finds the most similar pose to the provided pose.
If the HandGrabPose contains a surface it will defer the calculation to it.
Signature
virtual void Oculus.Interaction.HandGrab.HandGrabPose.CalculateBestPose(in Pose userPose, in Pose offset, Transform relativeTo, Handedness handedness, PoseMeasureParameters scoringModifier, ref HandGrabResult result)
Parameters
userPose: in Pose  The current pose of the user
offset: in Pose  The offset from the root, for accurate scoring
relativeTo: Transform  The relative transform
handedness: Handedness  The handedness of the grab
scoringModifier: PoseMeasureParameters  PoseMeasureParameters for score modification
result: ref HandGrabResult  Out parameter for the calculated pose
Returns
void
InjectAllHandGrabPose ( relativeTo )
Injects all required dependencies for a dynamically instantiated HandGrabPose; effectively wraps InjectRelativeTo(Transform).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.HandGrab.HandGrabPose.InjectAllHandGrabPose(Transform relativeTo)
Parameters
relativeTo: Transform
Returns
void
InjectOptionalHandPose ( handPose )
Sets the HandPose for a dynamically instantiated HandGrabPose.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.HandGrab.HandGrabPose.InjectOptionalHandPose(HandPose handPose)
Parameters
handPose: HandPose
Returns
void
InjectOptionalSurface ( surface )
Sets the IGrabSurface for a dynamically instantiated HandGrabPose.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.HandGrab.HandGrabPose.InjectOptionalSurface(IGrabSurface surface)
Parameters
surface: IGrabSurface
Returns
void
InjectRelativeTo ( relativeTo )
Sets the RelativeTo transform for a dynamically instantiated HandGrabPose.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.HandGrab.HandGrabPose.InjectRelativeTo(Transform relativeTo)
Parameters
relativeTo: Transform
Returns
void
UsesHandPose ()
Checks whether this instance uses hand poses.
Signature
bool Oculus.Interaction.HandGrab.HandGrabPose.UsesHandPose()
Returns
bool  True if HandPose should return a valid HandGrab.HandPose, false otherwise