XRBodyJointSetUtility

Utility class for XRBodyJointSet and individual joint set IDs.

Summary

Public static functions

FromIndex(int index, out XRUpperBodyJointID jointId)
void
Gets the corresponding XRUpperBodyJointID from an index into an array of associated data.
FromIndex(int index, out XRFullBodyJointID jointId)
void
Gets the corresponding XRFullBodyJointID from an index into an array of associated data.
GetJointSetType(this XRBodyJointSet jointSet)
Type
Gets the joint set type enum of the given joint set.
JointCount(Type jointSet)
int
Gets the count of joints of the target joint set.
ToIndex(this XRUpperBodyJointID jointId)
int
Converts XRUpperBodyJointID to its corresponding index into an array of joint data.
ToIndex(this XRFullBodyJointID jointId)
int
Converts XRFullBodyJointID to its corresponding index into an array of joint data.

Public static functions

FromIndex

void FromIndex(
  int index,
  out XRUpperBodyJointID jointId
)

Gets the corresponding XRUpperBodyJointID from an index into an array of associated data.

Details
Parameters
index
Index to convert to an ID.
jointId
If it's a valid index, output the ID matching the index passed in. Otherwise, set to XRUpperBodyJointID.Invalid.

FromIndex

void FromIndex(
  int index,
  out XRFullBodyJointID jointId
)

Gets the corresponding XRFullBodyJointID from an index into an array of associated data.

Details
Parameters
index
Index to convert to an ID.
jointId
If it's a valid index, output the ID matching the index passed in. Otherwise, set to XRFullBodyJointID.Invalid.

GetJointSetType

Type GetJointSetType(
  this XRBodyJointSet jointSet
)

Gets the joint set type enum of the given joint set.

Details
Parameters
jointSet
The target joint set.
Returns

JointCount

int JointCount(
  Type jointSet
)

Gets the count of joints of the target joint set.

Details
Parameters
jointSet
The target joint set type provided by GetJointSetType(XRBodyJointSet)
Returns
The amount of joints of the given joint set.

ToIndex

int ToIndex(
  this XRUpperBodyJointID jointId
)

Converts XRUpperBodyJointID to its corresponding index into an array of joint data.

Details
Parameters
jointId
ID of the joint to convert to an index.
Returns
The index matching the ID passed in.

ToIndex

int ToIndex(
  this XRFullBodyJointID jointId
)

Converts XRFullBodyJointID to its corresponding index into an array of joint data.

Details
Parameters
jointId
ID of the joint to convert to an index.
Returns
The index matching the ID passed in.