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

ShapeRecognizerActiveState Class

Extends MonoBehaviour
Used during hand pose detection to compare the current state of a hand's fingers to the state required by a given shape.
The shape's required state is defined in a ShapeRecognizer. If the two match, this state becomes active.

Protected Fields

FingerFeatureStateProvider : IFingerFeatureStateProvider
Signature
IFingerFeatureStateProvider Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.FingerFeatureStateProvider

Fields

Handedness : Handedness
This is a convenience method which wraps a call to the Hand.Handedness property of the Hand
Signature
Handedness Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Handedness
Shapes : IReadOnlyList< ShapeRecognizer >
The list of ShapeRecognizers which define the satisfactory shapes for Hand to adopt in order for Active to become true.
Signature
IReadOnlyList<ShapeRecognizer> Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Shapes

Properties

Active : bool
[Get]
Implementation of IActiveState.Active, in this case indicating whether the associated Hand is currently adopting any of the Shapes specified for recognition.
Signature
bool Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Active
Hand : IHand
[Get]
The IHand to be observed.
While this hand adopts a pose which meets the requirements of any of the specified Shapes, Active will be true.
Signature
IHand Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Hand

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.PoseDetection.ShapeRecognizerActiveState.Start()
Returns
void

Methods

InjectAllShapeRecognizerActiveState ( hand , fingerFeatureStateProvider , shapes )
Sets all required dependencies for a dynamically instantiated ShapeRecognizerActiveState.
This is a convenience method which wraps invocations of InjectHand(IHand), InjectFingerFeatureStateProvider(IFingerFeatureStateProvider), and InjectShapes(ShapeRecognizer[]). 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.PoseDetection.ShapeRecognizerActiveState.InjectAllShapeRecognizerActiveState(IHand hand, IFingerFeatureStateProvider fingerFeatureStateProvider, ShapeRecognizer[] shapes)
Parameters
hand: IHand
fingerFeatureStateProvider: IFingerFeatureStateProvider
shapes: ShapeRecognizer []
Returns
void
InjectAllShapeRecognizerActiveState ( fingerFeatureStateProvider , shapes )
Sets all required dependencies for a dynamically instantiated ShapeRecognizerActiveState.
This is a convenience method which wraps invocations of InjectHand(IHand), InjectFingerFeatureStateProvider(IFingerFeatureStateProvider), and InjectShapes(ShapeRecognizer[]). 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.PoseDetection.ShapeRecognizerActiveState.InjectAllShapeRecognizerActiveState(IFingerFeatureStateProvider fingerFeatureStateProvider, ShapeRecognizer[] shapes)
Parameters
fingerFeatureStateProvider: IFingerFeatureStateProvider
shapes: ShapeRecognizer []
Returns
void
InjectFingerFeatureStateProvider ( fingerFeatureStateProvider )
Sets an IFingerFeatureStateProvider as the provider for a dynamically instantiated ShapeRecognizerActiveState.
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.PoseDetection.ShapeRecognizerActiveState.InjectFingerFeatureStateProvider(IFingerFeatureStateProvider fingerFeatureStateProvider)
Parameters
fingerFeatureStateProvider: IFingerFeatureStateProvider
Returns
void
InjectHand ( hand )
Sets an IHand as the Hand for a dynamically instantiated ShapeRecognizerActiveState.
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.PoseDetection.ShapeRecognizerActiveState.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectShapes ( shapes )
Sets a list of ShapeRecognizers as the recognizable Shapes for a dynamically instantiated ShapeRecognizerActiveState.
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.PoseDetection.ShapeRecognizerActiveState.InjectShapes(ShapeRecognizer[] shapes)
Parameters
shapes: ShapeRecognizer []
Returns
void