API reference

BodyPoseComparerActiveState Class

Extends MonoBehaviour
Compares a user-provided set of joints between two Body Poses.
You can select which joints to monitor and what the maximum angle delta between each joint should be. If all joints are within this maximum range, the IActiveState becomes Active.

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
FeatureStates : IReadOnlyDictionary< JointComparerConfig, BodyPoseComparerFeatureState >
[Get]
Signature
IReadOnlyDictionary<JointComparerConfig, BodyPoseComparerFeatureState> FeatureStates
MinTimeInState : float
[Get][Set]
Signature
float MinTimeInState

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
Start ()
Signature
virtual void Start()
Returns
void

Methods

InjectAllBodyPoseComparerActiveState ( poseA , poseB , configs )
Signature
void InjectAllBodyPoseComparerActiveState(IBodyPose poseA, IBodyPose poseB, IEnumerable< JointComparerConfig > configs)
Parameters
poseA: IBodyPose
poseB: IBodyPose
configs: IEnumerable< JointComparerConfig >
Returns
void
InjectJoints ( configs )
Signature
void InjectJoints(IEnumerable< JointComparerConfig > configs)
Parameters
configs: IEnumerable< JointComparerConfig >
Returns
void
InjectOptionalTimeProvider ( timeProvider )
Signature
void InjectOptionalTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void
InjectPoseA ( poseA )
Signature
void InjectPoseA(IBodyPose poseA)
Parameters
poseA: IBodyPose
Returns
void
InjectPoseB ( poseB )
Signature
void InjectPoseB(IBodyPose poseB)
Parameters
poseB: IBodyPose
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 Class

JointComparerConfig Class

Fields

Joint : BodyJointId
Signature
BodyJointId Joint
MaxDelta : float
Signature
float MaxDelta
Width : float
Signature
float Width

Inner Struct

BodyPoseComparerFeatureState Struct

Constructors

BodyPoseComparerFeatureState ( delta , maxDelta )
Signature
BodyPoseComparerFeatureState(float delta, float maxDelta)
Parameters
delta: float
maxDelta: float

Fields

Delta : readonly float
Signature
readonly float Delta
MaxDelta : readonly float
Signature
readonly float MaxDelta