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

TransformRecognizerActiveState Class

Extends MonoBehaviour, IActiveState
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.

Properties

The IHand to be observed.
While this hand adopts a pose which meets the requirements, Active will be true.
Implements IActiveState.Active, in this case indicating whether the monitored transform currently satisfies the recognition conditions specified in the TransformConfig and FeatureConfigs.

Protected Fields

ITransformFeatureStateProvider TransformFeatureStateProvider[Get]
bool _started[Get]

Fields

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.
The transform config used in conjunction with an ITransformFeatureStateProvider and data from the FeatureConfigs to calculate whether or not this recognizer should be Active.

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void OnEnable ( )
virtual void OnDisable ( )

Member Functions

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.
Parameters
feature
The TransformFeature for which to retrieve the vector.
isHandVector
A boolean indicating whether the feature is being requested for a hand or for a controller.
featureVec
Output parameter to be populated with the requested feature vector.
wristPos
Output parameter to be populated with the wrist position to which the feature vector is related.
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.
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.
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.
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.
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon