1 #ifndef NUITRACK_SKELETONDATA_H_
2 #define NUITRACK_SKELETONDATA_H_
6 #include "nuitrack/types/Skeleton.h"
7 #include "nuitrack/types/ObjectData.h"
8 #include "nuitrack/capi/SkeletonTracker_CAPI.h"
25 nuitrack_AddSkeletonTrackerDataRef(pimpl);
30 nuitrack_DestroySkeletonTrackerData(_pimpl);
40 return nuitrack_GetNumUsers(_pimpl);
51 SkeletonTrackerData* dataHolder = _pimpl;
53 std::vector<Skeleton> usersVector;
55 size_t numUsers = nuitrack_GetNumUsers(dataHolder);
56 size_t maxJoints = 25;
58 for (
size_t i = 0; i < numUsers; i++)
61 int id = nuitrack_GetSkeletonID(dataHolder, i);
64 for (
size_t j = 0; j < maxJoints; j++)
67 nuitrack_GetSkeletonJoint(dataHolder, i, (
JointType)j, &joint);
68 skeleton.
joints.push_back(joint);
71 usersVector.push_back(skeleton);
86 return nuitrack_GetSkeletonTrackerTimestamp(_pimpl);
90 SkeletonTrackerData* _pimpl;
Generalized template for data with a timestamp.
Definition: ObjectData.h:39
const std::vector< Skeleton > getSkeletons() const
Get current user skeletons.
Definition: SkeletonData.h:48
int getNumSkeletons() const
Get current number of skeletons.
Definition: SkeletonData.h:38
Stores the data of all available skeletons at a certain point in time.
Definition: SkeletonData.h:19
uint64_t getTimestamp() const
Returns the data timestamp in microseconds.
Definition: SkeletonData.h:84
Stores the joint data.
Definition: Skeleton.h:56
JointType
Joint index meaning (please note that JOINT_LEFT_FINGERTIP, JOINT_RIGHT_FINGERTIP, JOINT_LEFT_FOOT, JOINT_RIGHT_FOOT are not used in the current version).
Definition: Skeleton.h:18
Stores the data of the skeleton.
Definition: Skeleton.h:108
int id
User Id. The same as other(UserTracker, HandTracker, GestureRecognizer) modules uses.
Definition: Skeleton.h:113
std::vector< Joint > joints
Array of joints. Where each index is ::JointType.
Definition: Skeleton.h:118