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

GrabbingRule Struct

This struct indicates which fingers should be taken in count for performing an interaction (for example, in HandGrab.HandGrabInteractor).
All required fingers must be in use in order to start the interaction while any of the optional fingers is needed. For finishing the action it supports either releasing all fingers or any of them.

Constructors

GrabbingRule ( mask , otherRule )
Projecting constructor which creates a new GrabbingRule as a subset of another.
Copies the otherRule 's requirements for fingers included in the mask bit mask, setting FingerRequirement.Ignored rules for all other fingers.
Signature
Oculus.Interaction.GrabAPI.GrabbingRule.GrabbingRule(HandFingerFlags mask, in GrabbingRule otherRule)
Parameters
mask: HandFingerFlags  Bit mask specifying which requirements from otherRule to copy
otherRule: in GrabbingRule  Original rule from which requirements should be copied

Fields

UnselectMode : FingerUnselectMode
Returns the FingerUnselectMode for this instance, which dictates whether the grab defined by this rule ends when any of its required fingers release, or when all of them do.
Signature
FingerUnselectMode Oculus.Interaction.GrabAPI.GrabbingRule.UnselectMode

Properties

DefaultPalmRule : GrabbingRule
[Get]
Standard definition for "palm grab": requires the middle three fingers to begin a grab, allowing that grab to persist as long as any finger continues grabbing.
Signature
GrabbingRule Oculus.Interaction.GrabAPI.GrabbingRule.DefaultPalmRule
DefaultPinchRule : GrabbingRule
[Get]
Standard definition for "pinch grab": allows grabbing to begin when any of the first three fingers (thumb, index, middle) grabs, persisting the grab as long as any of those three is grabbing, and ignoring the last two fingers.
Signature
GrabbingRule Oculus.Interaction.GrabAPI.GrabbingRule.DefaultPinchRule
FullGrab : GrabbingRule
[Get]
Standard definition for "full grab": requires all five fingers to begin a grab, allowing that grab to persist as long as any finger continues grabbing.
Signature
GrabbingRule Oculus.Interaction.GrabAPI.GrabbingRule.FullGrab
SelectsWithOptionals : bool
[Get]
This property checks whether this grab can be performed using only fingers marked FingerRequirement.Optional.
The property is true only if no fingers are marked as FingerRequirement.Required, false otherwise.
Signature
bool Oculus.Interaction.GrabAPI.GrabbingRule.SelectsWithOptionals
this[HandFinger fingerID] : FingerRequirement
[Get][Set]
Indexer for retrieving and setting FingerRequirements by their HandFinger type.
Signature
FingerRequirement Oculus.Interaction.GrabAPI.GrabbingRule.this[HandFinger fingerID]

Methods

StripIrrelevant ( fingerFlags )
In-place modifies a HandFingerFlags bit mask representing the grabbing state of the various fingers, suppressing any detected grabs by fingers marked FingerRequirement.Ignored in this rule.
Signature
void Oculus.Interaction.GrabAPI.GrabbingRule.StripIrrelevant(ref HandFingerFlags fingerFlags)
Parameters
fingerFlags: ref HandFingerFlags
Returns
void