API reference

TransformRecognizerActiveState Class

Extends MonoBehaviour
Used in hand pose detection (often as part of a Sequence to get the current state of the hand's Transforms and compare it to the required states.
The "Transform states" in question broadly pertain to the hand's orientation in user-relative terms; see TransformFeature for details. If the current state of the hand transforms meets the specified requirements, Active is true.

Protected Fields

_started : bool
Signature
bool Oculus.Interaction.PoseDetection.TransformRecognizerActiveState._started
TransformFeatureStateProvider : ITransformFeatureStateProvider
Signature
ITransformFeatureStateProvider Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.TransformFeatureStateProvider

Fields

FeatureConfigs : IReadOnlyList< TransformFeatureConfig >
The list of TransformFeatureConfigs which must be satisfied for recognition by this TransformRecognizerActiveState.
For an overview of the role of this list in shape recognition, see the remarks on TransformFeatureConfigList.
Signature
IReadOnlyList<TransformFeatureConfig> Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.FeatureConfigs
TransformConfig : TransformConfig
The transform config used in conjunction with an ITransformFeatureStateProvider and data from the FeatureConfigs to calculate whether or not this recognizer should be Active.
Signature
TransformConfig Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.TransformConfig

Properties

Active : bool
[Get]
Implements IActiveState.Active, in this case indicating whether the monitored transform currently satisfies the recognition conditions specified in the TransformConfig and FeatureConfigs.
Signature
bool Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.Active
Hand : IHand
[Get]
The IHand to be observed.
While this hand adopts a pose which meets the requirements, Active will be true.
Signature
IHand Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.Hand

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.OnEnable()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.Start()
Returns
void

Methods

GetFeatureVectorAndWristPos ( feature , isHandVector , featureVec , wristPos )
Retrieves the feature vector for the given inputs, invoking the internal ITransformFeatureStateProvider's ITransformFeatureStateProvider.GetFeatureVectorAndWristPos(TransformConfig, TransformFeature, bool, ref Vector3?, ref Vector3?) method with the TransformConfig and the provided arguments.
A "feature vector" in this case is simply a Vector3 whose value should be interpreted in some specific way depending on which TransformFeature. This is an internal API which you should not invoke directly in typical usage.
Signature
void Oculus.Interaction.PoseDetection.TransformRecognizerActiveState.GetFeatureVectorAndWristPos(TransformFeature feature, bool isHandVector, ref Vector3? featureVec, ref Vector3? wristPos)
Parameters
feature: TransformFeature  The TransformFeature for which to retrieve the vector.
isHandVector: bool  A boolean indicating whether the feature is being requested for a hand or for a controller.
featureVec: ref Vector3?  Output parameter to be populated with the requested feature vector.
wristPos: ref Vector3?  Output parameter to be populated with the wrist position to which the feature vector is related.
Returns
void
InjectAllTransformRecognizerActiveState ( hand , transformFeatureStateProvider , transformFeatureList , transformConfig )
Sets all required dependencies for a dynamically instantiated TransformRecognizerActiveState.
This is a convenience method which wraps invocations of InjectHand(IHand), InjectTransformFeatureStateProvider(ITransformFeatureStateProvider), InjectTransformFeatureList(TransformFeatureConfigList)m and InjectTransformConfig(TransformConfig). 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.TransformRecognizerActiveState.InjectAllTransformRecognizerActiveState(IHand hand, ITransformFeatureStateProvider transformFeatureStateProvider, TransformFeatureConfigList transformFeatureList, TransformConfig transformConfig)
Parameters
hand: IHand
transformFeatureStateProvider: ITransformFeatureStateProvider
transformFeatureList: TransformFeatureConfigList
transformConfig: TransformConfig
Returns
void
InjectAllTransformRecognizerActiveState ( transformFeatureStateProvider , transformFeatureList , transformConfig )
Sets all required dependencies for a dynamically instantiated TransformRecognizerActiveState.
This is a convenience method which wraps invocations of InjectHand(IHand), InjectTransformFeatureStateProvider(ITransformFeatureStateProvider), InjectTransformFeatureList(TransformFeatureConfigList)m and InjectTransformConfig(TransformConfig). 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.TransformRecognizerActiveState.InjectAllTransformRecognizerActiveState(ITransformFeatureStateProvider transformFeatureStateProvider, TransformFeatureConfigList transformFeatureList, TransformConfig transformConfig)
Parameters
transformFeatureStateProvider: ITransformFeatureStateProvider
transformFeatureList: TransformFeatureConfigList
transformConfig: TransformConfig
Returns
void
InjectHand ( hand )
Sets an IHand as the Hand for a dynamically instantiated TransformRecognizerActiveState.
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.TransformRecognizerActiveState.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectTransformConfig ( transformConfig )
Sets a PoseDetection.TransformConfig as the TransformConfig for a dynamically instantiated TransformRecognizerActiveState.
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.TransformRecognizerActiveState.InjectTransformConfig(TransformConfig transformConfig)
Parameters
transformConfig: TransformConfig
Returns
void
InjectTransformFeatureList ( transformFeatureList )
Sets a TransformFeatureConfigList as the FeatureConfigs for a dynamically instantiated TransformRecognizerActiveState.
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.TransformRecognizerActiveState.InjectTransformFeatureList(TransformFeatureConfigList transformFeatureList)
Parameters
transformFeatureList: TransformFeatureConfigList
Returns
void
InjectTransformFeatureStateProvider ( transformFeatureStateProvider )
Sets an ITransformFeatureStateProvider as the feature state provider (which assesses whether or not the monitored hand's transforms meet the requirements for recognition) for a dynamically instantiated TransformRecognizerActiveState.
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.TransformRecognizerActiveState.InjectTransformFeatureStateProvider(ITransformFeatureStateProvider transformFeatureStateProvider)
Parameters
transformFeatureStateProvider: ITransformFeatureStateProvider
Returns
void