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

JointRotationActiveState Class

Extends MonoBehaviour, IActiveState, ITimeConsumer
Tracks angular velocities (rotation deltas over the last two frames) for a list of joints and compares them to a rotation target around the provided axes.
If the rotation target (degrees per second) is met for the minimum time threshold, the state becomes Active.

Member Enumerations

Enumeration RelativeTo

Hand
= 0
World
= 1

Enumeration WorldAxis

PositiveX
= 0
NegativeX
= 1
PositiveY
= 2
NegativeY
= 3
PositiveZ
= 4
NegativeZ
= 5

Enumeration HandAxis

Pronation
= 0
Supination
= 1
RadialDeviation
= 2
UlnarDeviation
= 3
Extension
= 4
Flexion
= 5

Properties

IHand Hand[Get]
Evaluates the current state of the component and returns whether it is active.
The logic for determining the active state is defined by the implementing class. This method is typically used in interaction scripts to check whether a certain condition is met before triggering an event or action. For example implementations, please refer to HandActiveState.Active and ActiveStateGroup.Active.
Returns
Returns true if the component is currently active; otherwise, returns false.
IReadOnlyList< JointRotationFeatureConfig > FeatureConfigs[Get]
IReadOnlyDictionary< JointRotationFeatureConfig, JointRotationFeatureState > FeatureStates[Get]

Protected Fields

bool _started[Get]

Member Functions

Sets a function that returns the current time in seconds.
void InjectAllJointRotationActiveState
( JointRotationFeatureConfigList featureConfigs,
IHand hand,
IJointDeltaProvider jointDeltaProvider )
void InjectFeatureConfigList
( JointRotationFeatureConfigList featureConfigs )
void InjectHand
( IHand hand )
void InjectJointDeltaProvider
( IJointDeltaProvider jointDeltaProvider )
void InjectOptionalTimeProvider
( Func< float > timeProvider )

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void Update ( )
virtual void OnEnable ( )
virtual void OnDisable ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon