Represents the interface to the capabilities of the Nuitrack Gesture Recognizer module.
More...
#include <GestureRecognizer.h>
Inherits HeaderOnlyAPI_Module.
|
NuitrackModule * | _pimpl |
|
GestureRecognizerCallbackWrapper | _callbackWrapper |
|
CallbackStruct
< GestureData::Ptr > * | _onNewGesturesCallbackStruct |
|
CallbackStruct
< UserStateData::Ptr > * | _onUserStateChangeCallbackStruct |
|
CallbackStruct
< UserGesturesStateData::Ptr > * | _onUpdateCallbackStruct |
|
Represents the interface to the capabilities of the Nuitrack Gesture Recognizer module.
To enable the module, you must create an instance of this class. To create the instance, use a special named constructor GestureRecognizer::create. This instance is called GestureRecognizer module object. To receive the gesture progress estimation data, add an GestureRecognizer::OnUpdate callback to the module object with GestureRecognizer::connectOnUpdate method. To handle event of user state change, add GestureRecognizer::OnUserStateChange callback with SkeletonTracker::connectOnUserStateChange method. To handle event of new gesture detection, add GestureRecognizer::OnNewGestures callback with SkeletonTracker::connectOnNewGestures method.
The callback type of the new gesture detection event.
This callback is called when it is detected that the user is performing a new gesture. This callback receive a smart pointer to GestureData.
- See Also
- connectOnNewGestures
The callback type of the user state change event.
This callback will be called when it is detected that the user state has changed. This callback receive a smart pointer to UserStateData.
- See Also
- connectOnUserStateChange
tdv::nuitrack::GestureRecognizer::GestureRecognizer |
( |
NuitrackModule * |
pimpl | ) |
|
|
inline |
- Warning
- For internal use only.
uint64_t tdv::nuitrack::GestureRecognizer::connectOnNewGestures |
( |
const OnNewGestures & |
callback | ) |
|
|
inline |
Add a callback for the new gesture detection event.
- Parameters
-
[in] | callback | Callback to be invoked after the gesture data update request, if it is detected that the user is performing a new gesture. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnNewGestures
uint64_t tdv::nuitrack::GestureRecognizer::connectOnUpdate |
( |
const OnUpdate & |
callback | ) |
|
|
inline |
Add a callback for the gesture state data update request.
- Parameters
-
[in] | callback | Callback to be invoked after the gesture state data update request. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnUpdate
uint64_t tdv::nuitrack::GestureRecognizer::connectOnUserStateChange |
( |
const OnUserStateChange & |
callback | ) |
|
|
inline |
Add a callback for the user state change event.
- Parameters
-
[in] | callback | Callback to be invoked after the skeleton data update request, if it is detected that the user state has changed. |
- Returns
- Registered callback ID. You can use it to remove the callback.
- See Also
- disconnectOnUserStateChange
static GestureRecognizer::Ptr tdv::nuitrack::GestureRecognizer::create |
( |
| ) |
|
|
inlinestatic |
Create the GestureRecognizer module object.
- Returns
- Smart pointer to a new GestureRecognizer instance.
- Note
- Do not call this method twice. Instead, use the previously received GestureRecognizer::Ptr.
void tdv::nuitrack::GestureRecognizer::destroyGestureRecognizer |
( |
| ) |
|
|
inline |
- Warning
- For internal use only.
void tdv::nuitrack::GestureRecognizer::disconnectOnNewGestures |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the new gesture detection event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnNewGestures
void tdv::nuitrack::GestureRecognizer::disconnectOnUpdate |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the gesture state data update request.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnUpdate
void tdv::nuitrack::GestureRecognizer::disconnectOnUserStateChange |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the user state change event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnUserStateChange
virtual uint64_t tdv::nuitrack::GestureRecognizer::getTimestamp |
( |
| ) |
|
|
inlinevirtual |
Returns the last processed data timestamp in microseconds.
Returns timestamp corresponding to the last estimation of gestures.
- Note
- The exact meaning of this value depends on the depth provider.
static void tdv::nuitrack::GestureRecognizer::onNewGesturesCallback |
( |
GestureRecognizerData * |
data, |
|
|
GestureRecognizer * |
tracker |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
static void tdv::nuitrack::GestureRecognizer::onUpdateCallback |
( |
GestureRecognizerUserGesturesStateData * |
data, |
|
|
GestureRecognizer * |
tracker |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
static void tdv::nuitrack::GestureRecognizer::onUserStateChangeCallback |
( |
UsersStateChanges * |
data, |
|
|
GestureRecognizer * |
tracker |
|
) |
| |
|
inlinestaticprotected |
- Warning
- For internal use only.
void tdv::nuitrack::GestureRecognizer::setControlGesturesStatus |
( |
bool |
status | ) |
|
|
inline |
Set control gesture recognition state.
Call setControlGesturesStatus(true) to enable control gestures. Call setControlGesturesStatus(false) to disable control gestures.
- Parameters
-
[in] | status | Control gesture recognition state to be set. |
GestureRecognizerCallbackWrapper tdv::nuitrack::GestureRecognizer::_callbackWrapper |
|
protected |
- Warning
- For internal use only.
CallbackStruct<GestureData::Ptr>* tdv::nuitrack::GestureRecognizer::_onNewGesturesCallbackStruct |
|
protected |
- Warning
- For internal use only.
NuitrackModule* tdv::nuitrack::GestureRecognizer::_pimpl |
|
protected |
- Warning
- For internal use only.