API reference

JointRotationActiveState Class

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

Protected Fields

_started : bool
Signature
bool _started

Properties

Active : bool
[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.
Signature
bool Active
FeatureConfigs : IReadOnlyList< JointRotationFeatureConfig >
[Get]
Signature
IReadOnlyList<JointRotationFeatureConfig> FeatureConfigs
FeatureStates : IReadOnlyDictionary< JointRotationFeatureConfig, JointRotationFeatureState >
[Get]
Signature
IReadOnlyDictionary<JointRotationFeatureConfig, JointRotationFeatureState> FeatureStates
Hand : IHand
[Get]
Signature
IHand Hand

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
Start ()
Signature
virtual void Start()
Returns
void
Update ()
Signature
virtual void Update()
Returns
void

Methods

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

Inner Classes

JointRotationFeatureConfig Class

Properties

HandAxis : HandAxis
[Get][Set]
Signature
HandAxis HandAxis
RelativeTo : RelativeTo
[Get][Set]
Signature
RelativeTo RelativeTo
WorldAxis : WorldAxis
[Get][Set]
Signature
WorldAxis WorldAxis

JointRotationFeatureConfigList Class

Properties

Values : List< JointRotationFeatureConfig >
[Get]
Signature
List<JointRotationFeatureConfig> Values

Inner Struct

JointRotationFeatureState Struct

Constructors

JointRotationFeatureState ( targetAxis , amount )
Signature
JointRotationFeatureState(Vector3 targetAxis, float amount)
Parameters
targetAxis: Vector3
amount: float

Fields

Amount : readonly float
The normalized joint rotation along the target axis relative to _degreesPerSecond
Signature
readonly float Amount
TargetAxis : readonly Vector3
The world target euler angles for a JointRotationFeatureConfig
Signature
readonly Vector3 TargetAxis

Inner Enums

RelativeTo Enum

Enumeration Constants

MemberValue
Hand
0
World
1

WorldAxis Enum

Enumeration Constants

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

HandAxis Enum

Enumeration Constants

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