1 #ifndef NUITRACK_GESTUREDATA_H_
2 #define NUITRACK_GESTUREDATA_H_
4 #include "nuitrack/types/ObjectData.h"
5 #include "nuitrack/types/Gesture.h"
6 #include "nuitrack/capi/GestureRecognizer_CAPI.h"
23 nuitrack_AddGestureRecognizerDataRef(pimpl);
28 nuitrack_DestroyGestureRecognizerData(_pimpl);
40 return nuitrack_GetUserGesturesTimestamp(_pimpl);
48 return nuitrack_GetUserGesturesNumGestures(_pimpl);
58 std::vector<Gesture> gesturesVector;
60 GestureRecognizerData* dataHolder = _pimpl;
63 size_t numUsers = nuitrack_GetUserGesturesNumGestures(dataHolder);
65 for(
size_t i = 0; i < numUsers; i++)
68 nuitrack_GetUserGesture(dataHolder, i, &g);
69 gesturesVector.push_back(g);
72 return gesturesVector;
76 GestureRecognizerData* _pimpl;
91 nuitrack_AddUsersStateChangesRef(pimpl);
96 nuitrack_DestroyUsersStateChanges(_pimpl);
104 return nuitrack_GetNumUsersStateChanges(_pimpl);
116 return nuitrack_GetUsersStateChangesTimestamp(_pimpl);
126 std::vector<UserState> usersVector;
128 UsersStateChanges* dataHolder = _pimpl;
130 size_t numUsers = nuitrack_GetNumUsersStateChanges(dataHolder);
132 for(
size_t i = 0; i < numUsers; i++)
135 nuitrack_GetUserStateChange(dataHolder, i, &g);
136 usersVector.push_back(g);
143 UsersStateChanges* _pimpl;
159 nuitrack_AddUsersStateDataRef(pimpl);
164 nuitrack_DestroyUsersStateData(_pimpl);
172 return nuitrack_GetNumUsersGestures(_pimpl);
184 return nuitrack_GetUsersGesturesStateTimestamp(_pimpl);
194 std::vector<UserGesturesState> usersVector;
196 GestureRecognizerUserGesturesStateData* dataHolder = _pimpl;
199 int numUsers = nuitrack_GetNumUsersGestures(dataHolder);
201 for(
int i = 0; i < numUsers; i++)
206 nuitrack_GetUserStateData(dataHolder, i, &ugsTemp);
207 ugs.userId = ugsTemp.userId;
208 ugs.state = ugsTemp.state;
210 int numGestures = nuitrack_GetNumUserGestureState(dataHolder, i);
211 for(
int j = 0; j < numGestures; j++)
214 nuitrack_GetUserGestureState(dataHolder, i, j, &gs);
215 ugs.gestures.push_back(gs);
218 usersVector.push_back(ugs);
225 GestureRecognizerUserGesturesStateData* _pimpl;
Generalized template for data with a timestamp.
Definition: ObjectData.h:39
Stores the results of user state estimation.
Definition: GestureData.h:84
int getNumGestures() const
Returns the number of gestures detected.
Definition: GestureData.h:46
Describes a gesture with a binding to a user.
Definition: Gesture.h:41
UserGesturesStateData(GestureRecognizerUserGesturesStateData *pimpl)
Definition: GestureData.h:156
Stores the results of gesture estimation.
Definition: GestureData.h:16
uint64_t getTimestamp() const
Returns the data timestamp in microseconds.
Definition: GestureData.h:38
UserStateData(UsersStateChanges *pimpl)
Definition: GestureData.h:88
Describes a state of a particular user.
Definition: Gesture.h:58
int getNumUsers() const
Returns the number of tracked users.
Definition: GestureData.h:170
Stores the results of estimation of the state of gestures for every tracked user. ...
Definition: GestureData.h:152
int getNumUserStates() const
Returns the number of user states detected.
Definition: GestureData.h:102
uint64_t getTimestamp() const
Returns the data timestamp in microseconds.
Definition: GestureData.h:114
const std::vector< UserState > getUserStates() const
Returns descriptions of detected states of users.
Definition: GestureData.h:124
const std::vector< Gesture > getGestures() const
Returns descriptions of detected gestures.
Definition: GestureData.h:56
Describes the user's state, supplemented by information about the actions currently being performed...
Definition: Gesture.h:93
const std::vector< UserGesturesState > getUserGesturesStates() const
Returns information about the gestures of the tracked users.
Definition: GestureData.h:192
Describes the state of a gesture.
Definition: Gesture.h:75
GestureData(GestureRecognizerData *pimpl)
Definition: GestureData.h:20
uint64_t getTimestamp() const
Returns the data timestamp in microseconds.
Definition: GestureData.h:182