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

HandGrabInteraction Class

Helper class for Hand Grabbing objects.

Overview

Static Public Member Functions

static bool
TryCalculateBestGrab
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabTypes,
out HandGrabTarget.GrabAnchor anchorMode,
ref HandGrabResult handGrabResult )
Calculates a new target.
static GrabTypeFlags
CurrentGrabType
( this IHandGrabInteractor handGrabInteractor )
static void
CalculateBestGrab
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabFlags,
out GrabTypeFlags activeGrabFlags,
ref HandGrabResult result )
Calculates a new target.
static IMovement
GenerateMovement
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable )
Initiates the movement of the Interactable with the current HandGrabTarget.
static Pose
GetHandGrabPose
( this IHandGrabInteractor handGrabInteractor )
Gets the current pose of the current grabbing point.
GetPoseScore
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabTypes,
ref HandGrabResult result )
Calculates the GrabPoseScore for an interactable with the given grab modes.
static bool
CanInteractWith
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
Indicates if an interactor can interact with (hover and select) and interactable.
static Pose
GetGrabOffset
( this IHandGrabInteractor handGrabInteractor )
Calculates the offset from the Wrist to the actual grabbing point defined by the current anchor in the interactor HandGrabTarget.
static float
ComputeHandGrabScore
( IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable,
out GrabTypeFlags handGrabTypes,
bool includeSelecting )
Calculates the strenght of the fingers of an interactor trying (or grabbing) an interactable.
static GrabTypeFlags
ComputeShouldSelect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
static GrabTypeFlags
ComputeShouldUnselect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
static HandFingerFlags
GrabbingFingers
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
static void
GetPoseOffset
( this IHandGrabInteractor handGrabInteractor,
GrabTypeFlags anchorMode,
out Pose pose,
out Pose offset )
Calculates the root of a grab and the practica offset to the grabbing point.

Details

Detailed Description

This class keeps track of the grabbing anchors and updates the target and movement during a Hand Grab interaction.

Static Member Functions

static bool Oculus.Interaction.HandGrab.HandGrabInteraction.TryCalculateBestGrab
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabTypes,
out HandGrabTarget.GrabAnchor anchorMode,
ref HandGrabResult handGrabResult )
Calculates a new target.
That is the point of the interactable at which the HandGrab will happen.
Parameters
interactable
The interactable to be HandGrabbed
grabTypes
The supported GrabTypes
anchorMode
The anchor to use for grabbing
handGrabResult
The a variable to store the result
Returns
True if a valid pose was found
static GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabInteraction.CurrentGrabType
( this IHandGrabInteractor handGrabInteractor )
No description available.
static void Oculus.Interaction.HandGrab.HandGrabInteraction.CalculateBestGrab
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabFlags,
out GrabTypeFlags activeGrabFlags,
ref HandGrabResult result )
Calculates a new target.
That is the point of the interactable at which the HandGrab will happen.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to be HandGrabbed
grabFlags
The supported GrabTypes
activeGrabFlags
The anchor to use for grabbing
result
The a variable to store the result
static IMovement Oculus.Interaction.HandGrab.HandGrabInteraction.GenerateMovement
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable )
Initiates the movement of the Interactable with the current HandGrabTarget.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to be HandGrabbed
static Pose Oculus.Interaction.HandGrab.HandGrabInteraction.GetHandGrabPose
( this IHandGrabInteractor handGrabInteractor )
Gets the current pose of the current grabbing point.
Returns
The pose in world coordinates
static GrabPoseScore Oculus.Interaction.HandGrab.HandGrabInteraction.GetPoseScore
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable interactable,
GrabTypeFlags grabTypes,
ref HandGrabResult result )
Calculates the GrabPoseScore for an interactable with the given grab modes.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to measure to
grabTypes
The supported grab types for the grab
result
Calculating the score requires finding the best grab pose. It is stored here.
Returns
The best GrabPoseScore considering the grabtypes at the interactable
static bool Oculus.Interaction.HandGrab.HandGrabInteraction.CanInteractWith
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
Indicates if an interactor can interact with (hover and select) and interactable.
This depends on the handedness and the valid grab types of both elements
Parameters
handGrabInteractor
The interactor grabbing
handGrabInteractable
The interactable to be grabbed
Returns
True if the interactor could grab the interactable
static Pose Oculus.Interaction.HandGrab.HandGrabInteraction.GetGrabOffset
( this IHandGrabInteractor handGrabInteractor )
Calculates the offset from the Wrist to the actual grabbing point defined by the current anchor in the interactor HandGrabTarget.
Parameters
handGrabInteractor
The interactor whose HandGrabTarget to inspect
Returns
The local offset from the wrist to the grab point
static float Oculus.Interaction.HandGrab.HandGrabInteraction.ComputeHandGrabScore
( IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable,
out GrabTypeFlags handGrabTypes,
bool includeSelecting )
Calculates the strenght of the fingers of an interactor trying (or grabbing) an interactable.
Parameters
handGrabInteractor
The interactor grabbing
handGrabInteractable
The interactable being grabbed
handGrabTypes
A filter for the grab types to calculate
includeSelecting
Compute also fingers that are selecting
Returns
The maximum strength for the grabbing fingers, normalized
static GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabInteraction.ComputeShouldSelect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
No description available.
static GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabInteraction.ComputeShouldUnselect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
No description available.
static HandFingerFlags Oculus.Interaction.HandGrab.HandGrabInteraction.GrabbingFingers
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
No description available.
static void Oculus.Interaction.HandGrab.HandGrabInteraction.GetPoseOffset
( this IHandGrabInteractor handGrabInteractor,
GrabTypeFlags anchorMode,
out Pose pose,
out Pose offset )
Calculates the root of a grab and the practica offset to the grabbing point.
Parameters
handGrabInteractor
The interactor grabbing
anchorMode
The grab types to be used
pose
The root of the grab pose to use
offset
The offset form the root for accurate scoring
Did you find this page helpful?
Thumbs up icon
Thumbs down icon