API reference

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

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

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 ( fingerFeatureStateProvider , shapes )
Sets all required dependencies for a dynamically instantiated ShapeRecognizerActiveState.
This is a convenience method which wraps invocations of 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
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