API reference
API reference
Select your platform
No SDKs available
No versions available

GrabPoseFinder Class

Utility class used by the grab interactors to find the best matching pose from a provided list of HandGrabPoses in an object.

Constructors

GrabPoseFinder ( handGrabPoses , relativeTo )
Signature
Oculus.Interaction.HandGrab.GrabPoseFinder.GrabPoseFinder(List< HandGrabPose > handGrabPoses, Transform relativeTo)
Parameters
handGrabPoses: List< HandGrabPose >
relativeTo: Transform

Properties

UsesHandPose : bool
[Get]
Signature
bool Oculus.Interaction.HandGrab.GrabPoseFinder.UsesHandPose

Methods

FindBestPose ( userPose , offset , handScale , handedness , scoringModifier , result )
Finds the best valid hand-pose at this HandGrabInteractable.
Remember that a HandGrabPoses can actually have a whole surface the user can snap to.
Signature
bool Oculus.Interaction.HandGrab.GrabPoseFinder.FindBestPose(in Pose userPose, in Pose offset, float handScale, Handedness handedness, PoseMeasureParameters scoringModifier, ref HandGrabResult result)
Parameters
userPose: in Pose  Pose to compare to the snap point in world coordinates.
offset: in Pose  Offset from the Pose for accurate scoring
handScale: float  The scale of the tracked hand.
handedness: Handedness  The handedness of the tracked hand.
scoringModifier: PoseMeasureParameters  Parameters indicating how to score the different poses.
result: ref HandGrabResult  The resultant best pose found.
Returns
bool  True if a good pose was found
SupportsHandedness ( handedness )
Signature
bool Oculus.Interaction.HandGrab.GrabPoseFinder.SupportsHandedness(Handedness handedness)
Parameters
handedness: Handedness
Returns
bool

Static Methods

FindInterpolationRange ( relativeHandScale , grabPoses , from , to , t )
Finds the two nearest HandGrabPose to interpolate from given a scale.
The result can require an unclamped interpolation (t can be bigger than 1 or smaller than 0).
Signature
static bool Oculus.Interaction.HandGrab.GrabPoseFinder.FindInterpolationRange(float relativeHandScale, List< HandGrabPose > grabPoses, out HandGrabPose from, out HandGrabPose to, out float t)
Parameters
relativeHandScale: float  The user scale relative to the target
grabPoses: List< HandGrabPose >  The list of grab poses to interpolate from
from: out HandGrabPose  The HandGrabInteractable with nearest scale recorder that is smaller than the provided one
to: out HandGrabPose  The HandGrabInteractable with nearest scale recorder that is bigger than the provided one
t: out float  The progress between from and to variables at which the desired scale resides
Returns
bool  The HandGrabPose near under and over the scale, and the interpolation factor between them.

Inner Enum

FindResult Enum

Enumeration Constants

Member
NotFound
NotCompatible
Found