1 #ifndef NUITRACK_HANDTRACKERDATA_H_
2 #define NUITRACK_HANDTRACKERDATA_H_
4 #include "nuitrack/types/ObjectData.h"
5 #include "nuitrack/types/Hand.h"
6 #include "nuitrack/capi/HandTracker_CAPI.h"
24 nuitrack_AddHandTrackerDataRef(_pimpl);
29 nuitrack_DestroyHandTrackerData(_pimpl);
41 return nuitrack_GetHandTrackerDataTimestamp(_pimpl);
49 return nuitrack_HandTrackerGetNumUsers(_pimpl);
59 HandTrackerDataInner* dataHolder = _pimpl;
61 size_t numUsers = nuitrack_HandTrackerGetNumUsers(dataHolder);
63 std::vector<UserHands> userHands;
68 for(
size_t i = 0; i < numUsers; i++)
70 nuitrack_HandTrackerGetUserHands(dataHolder, i, &userId, &leftHand, &rightHand);
72 newHand.userId = userId;
75 userHands.push_back(newHand);
82 HandTrackerDataInner* _pimpl;
Generalized template for data with a timestamp.
Definition: ObjectData.h:39
int getNumUsers() const
Returns the number of users handled by the hand tracker.
Definition: HandTrackerData.h:47
Stores information about the user's hand.
Definition: Hand.h:14
Stores information about the user's hand.
Definition: Hand.h:36
const std::vector< UserHands > getUsersHands() const
Returns information about the hands of the tracked users.
Definition: HandTrackerData.h:57
Hand::Ptr leftHand
User left hand data.
Definition: Hand.h:43
std::shared_ptr< Hand > Ptr
Definition: Hand.h:19
HandTrackerData(HandTrackerDataInner *pimpl)
Definition: HandTrackerData.h:21
uint64_t getTimestamp() const
Returns the data timestamp in microseconds.
Definition: HandTrackerData.h:39
Hand::Ptr rightHand
User right hand data.
Definition: Hand.h:44
Stores hand tracking results related to a specific point in time.
Definition: HandTrackerData.h:17