# XRBodyJointSetUtility

Utility class for [XRBodyJointSet](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrbodyjointset) and individual joint set IDs.

## Summary

| ### Public static functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#fromindex(int index, out https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrupperbodyjointid jointId)` | `void` Gets the corresponding [XRUpperBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrupperbodyjointid) from an index into an array of associated data. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#fromindex(int index, out https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrfullbodyjointid jointId)` | `void` Gets the corresponding [XRFullBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrfullbodyjointid) from an index into an array of associated data. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#getjointsettype(this https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrbodyjointset jointSet)` | `Type` Gets the joint set type enum of the given joint set. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#jointcount(Type jointSet)` | `int` Gets the count of joints of the target joint set. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#toindex(this https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrupperbodyjointid jointId)` | `int` Converts [XRUpperBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrupperbodyjointid) to its corresponding index into an array of joint data. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyJointSetUtility#toindex(this https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrfullbodyjointid jointId)` | `int` Converts [XRFullBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrfullbodyjointid) to its corresponding index into an array of joint data. |

## Public static functions

### FromIndex

```c#
void FromIndex(
  int index,
  out XRUpperBodyJointID jointId
)
```
Gets the corresponding [XRUpperBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#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](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrupperbodyjointid_invalid).

### FromIndex

```c#
void FromIndex(
  int index,
  out XRFullBodyJointID jointId
)
```
Gets the corresponding [XRFullBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#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](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrfullbodyjointid_invalid).

### GetJointSetType

```c#
Type GetJointSetType(
  this XRBodyJointSet jointSet
)
```
Gets the joint set type enum of the given joint set.


Details Parameters `jointSet` The target joint set. **Returns** If it's a valid [, returns the enum type representing the joint set IDs. Otherwise, returns null.](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrbodyjointset)

### JointCount

```c#
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

```c#
int ToIndex(
  this XRUpperBodyJointID jointId
)
```
Converts [XRUpperBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#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

```c#
int ToIndex(
  this XRFullBodyJointID jointId
)
```
Converts [XRFullBodyJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#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.