Handles the visualization of the skeleton joints. More...
Data Fields | |
List< GameObject > | _listOfJoints = new List<GameObject>() |
The list of joints used for visualization. More... | |
Static Public Attributes | |
static SkeletonManager | instance |
Creates instance of SkeletonManager More... | |
Private Member Functions | |
void | Awake () |
void | Start () |
void | Inititialize () |
void | SkeletonModel (int modelToLoad, int previousModel) |
Create the hand model depending if you use 3D or 2D joints. More... | |
void | ResetLineRenderers () |
Reset the Linerenders when changing Skeleton Model 2D/3D More... | |
void | Update () |
float | radianToDegrees (float radiantValue) |
Calculates the radiant value to degrees More... | |
void | UpdateJointorientation () |
Updates the orientation of the joints according to the orientation given by the SDK. More... | |
void | UpdateJointPositions () |
Updates the position of the joints according to the positions given by the SDK. More... | |
Private Attributes | |
GameObject[] | jointPrefab |
The prefab that will be used for visualization of the joints. More... | |
LineRenderer[] | lineRenderers = new LineRenderer[6] |
The linerenderes used on the joints in the jointPrefabs. More... | |
float | clampMinDepth = 0.4f |
used to clamp the depth value More... | |
bool | hasConfidence |
Skeleton confidence. More... | |
float | skeletonConfidenceThreshold = 0.0001f |
Material[] | jointsMaterial |
The materials used on the joints / Line renderers. More... | |
int | depthDivider = 10 |
Use this to make the depth values smaler to fit the depth of the hand. More... | |
int | jointsLength = 21 |
The number of Joints the skeleton is made of. More... | |
SkeletonInfo | skeletonInfo |
bool | isRightHand = false |
Used to set the current hand detected by the camera. More... | |
Handles the visualization of the skeleton joints.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Calculates the radiant value to degrees
radiantValue | the radiant value |
|
inlineprivate |
Reset the Linerenders when changing Skeleton Model 2D/3D
|
inlineprivate |
Create the hand model depending if you use 3D or 2D joints.
The model need to have 21 joints.
modelToLoad | The current model displayed |
previousModel | The previous model used |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Updates the orientation of the joints according to the orientation given by the SDK.
|
inlineprivate |
Updates the position of the joints according to the positions given by the SDK.
If confidence is to low, the joints will fade out.
List<GameObject> SkeletonManager._listOfJoints = new List<GameObject>() |
The list of joints used for visualization.
|
private |
used to clamp the depth value
|
private |
Use this to make the depth values smaler to fit the depth of the hand.
|
private |
Skeleton confidence.
|
static |
Creates instance of SkeletonManager
|
private |
Used to set the current hand detected by the camera.
|
private |
The prefab that will be used for visualization of the joints.
|
private |
The number of Joints the skeleton is made of.
|
private |
The materials used on the joints / Line renderers.
|
private |
The linerenderes used on the joints in the jointPrefabs.
|
private |
|
private |