API reference

IBody Interface

The primary interface through which Body data is accessed.
Components consuming body data should prefer to do so through this interface rather than the concrete Body.

Properties

ISkeletonMapping SkeletonMapping[Get]
The mapping for this body, which allows querying of the supported joint set of the skeleton as well as joint parent/child relationship.
bool IsConnected[Get]
Is the body connected and tracked.
bool IsHighConfidence[Get]
The body is connected and tracked, and the root pose's tracking data is marked as high confidence.
If this is true, then it implies that IsConnected is also true, so they don't need to be checked in addition to this.
bool IsTrackedDataValid[Get]
True if the body is currently tracked, thus tracking poses are available for the body root and joints.
float Scale[Get]
The scale of the body skeleton applied to world joint poses.
int CurrentDataVersion[Get]
Incremented every time the source tracking or state data changes.

Events

Action WhenBodyUpdated
Called each time the body is updated with new data.

Member Functions

bool GetRootPose
( out Pose pose )
Gets the root pose of the body, in world space.
Will return true if a pose was available; false otherwise. Confidence level of the pose is exposed via IsHighConfidence.
bool GetJointPose
( BodyJointId bodyJointId,
out Pose pose )
Attempts to calculate the pose of the requested body joint, in world space.
Returns false if the skeleton is not yet initialized, or there is no valid tracking data. Scale is applied to this joint position.
bool GetJointPoseLocal
( BodyJointId bodyJointId,
out Pose pose )
Attempts to calculate the pose of the requested body joint, in local space to its parent joint.
Returns false if the skeleton is not yet initialized, or there is no valid tracking data. Scale is not applied.
bool GetJointPoseFromRoot
( BodyJointId bodyJointId,
out Pose pose )
Attempts to calculate the pose of the requested hand joint relative to the root.
Returns false if the skeleton is not yet initialized, or there is no valid tracking data. Scale is not applied.