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

JointVelocityActiveState Class

Extends MonoBehaviour
Tracks velocities (position deltas over the last two frames) for a list of joints and compares them to a velocity target along the provided axes.
If the velocity target (units 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< JointVelocityFeatureConfig >
[Get]
Signature
IReadOnlyList<JointVelocityFeatureConfig> FeatureConfigs
FeatureStates : IReadOnlyDictionary< JointVelocityFeatureConfig, JointVelocityFeatureState >
[Get]
Signature
IReadOnlyDictionary<JointVelocityFeatureConfig, JointVelocityFeatureState> FeatureStates
Hand : IHand
[Get]
Signature
IHand Hand
Hmd : IHmd
[Get]
Signature
IHmd Hmd
JointDeltaProvider : IJointDeltaProvider
[Get]
Signature
IJointDeltaProvider JointDeltaProvider

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

InjectAllJointVelocityActiveState ( featureConfigs , hand , jointDeltaProvider )
Signature
void InjectAllJointVelocityActiveState(JointVelocityFeatureConfigList featureConfigs, IHand hand, IJointDeltaProvider jointDeltaProvider)
Parameters
featureConfigs: JointVelocityFeatureConfigList
hand: IHand
jointDeltaProvider: IJointDeltaProvider
Returns
void
InjectFeatureConfigList ( featureConfigs )
Signature
void InjectFeatureConfigList(JointVelocityFeatureConfigList featureConfigs)
Parameters
featureConfigs: JointVelocityFeatureConfigList
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
InjectOptionalHmd ( hmd )
Signature
void InjectOptionalHmd(IHmd hmd)
Parameters
hmd: IHmd
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

JointVelocityFeatureConfig Class

Properties

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

JointVelocityFeatureConfigList Class

Properties

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

Inner Struct

JointVelocityFeatureState Struct

Constructors

JointVelocityFeatureState ( targetVector , velocity )
Signature
JointVelocityFeatureState(Vector3 targetVector, float velocity)
Parameters
targetVector: Vector3
velocity: float

Fields

Amount : readonly float
The normalized joint velocity along the target vector relative to _minVelocity
Signature
readonly float Amount
TargetVector : readonly Vector3
The world target vector for a JointVelocityFeatureConfig
Signature
readonly Vector3 TargetVector

Inner Enums

RelativeTo Enum

Enumeration Constants

MemberValue
Hand
0
World
1
Head
2

WorldAxis Enum

Enumeration Constants

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

HeadAxis Enum

Enumeration Constants

MemberValue
HeadForward
0
HeadBackward
1
HeadUp
2
HeadDown
3
HeadLeft
4
HeadRight
5

HandAxis Enum

Enumeration Constants

MemberValue
PalmForward
0
PalmBackward
1
WristUp
2
WristDown
3
WristForward
4
WristBackward
5