Represents the interface to the capabilities of the Nuitrack User Tracker module.
More...
#include <UserTracker.h>
Inherits HeaderOnlyAPI_Module.
|
typedef std::shared_ptr
< UserTracker > | Ptr |
| Smart pointer to access the UserTracker instance. More...
|
|
typedef std::function< void(UserFrame::Ptr)> | OnUpdate |
| The callback type of the user frame update request. More...
|
|
typedef void(* | OnUpdateRawFunctionPtr )(UserFrame *, UserTracker *) |
|
typedef std::function< void(int)> | OnNewUser |
| The callback type of the new user apearance event. More...
|
|
typedef void(* | OnNewUserRawFunctionPtr )(int, UserTracker *) |
|
typedef std::function< void(int)> | OnLostUser |
| The callback type of the user disapearance event. More...
|
|
typedef void(* | OnLostUserRawFunctionPtr )(int, UserTracker *) |
|
Represents the interface to the capabilities of the Nuitrack User Tracker module.
To enable the module, you must create an instance of this class. To create the instance, use a special named constructor UserTracker::create. This instance is called UserTracker module object. To receive the user tracking data, add an UserTracker::OnUpdate callback to the module object with UserTracker::connectOnUpdate method. To handle events of appearance and disappearance of the user, add UserTracker::OnNewUser and UserTracker::OnLostUser callbacks with UserTracker::connectOnNewUser and UserTracker::connectOnLostUser methods respectively.
The callback type of the user disapearance event.
This callback will be called if a user disapears from the frame. This callback receive the ID of the lost user.
- See Also
- connectOnLostUser
The callback type of the new user apearance event.
This callback will be called if a new user appears in the frame. This callback receive the ID of the new user.
- See Also
- connectOnNewUser
tdv::nuitrack::UserTracker::UserTracker |
( |
NuitrackModule * |
pimpl | ) |
|
|
inline |
- Warning
- For internal use only.
uint64_t tdv::nuitrack::UserTracker::connectOnLostUser |
( |
const OnLostUser & |
callback | ) |
|
|
inline |
Add a callback for the user disappearance event.
- Parameters
-
[in] | callback | Callback to be invoked after the user frame update request, if a user is found to be missing. |
- Returns
- Registered callback ID. You can use it to remove the callback.
- See Also
- disconnectOnLostUser
uint64_t tdv::nuitrack::UserTracker::connectOnNewUser |
( |
const OnNewUser & |
callback | ) |
|
|
inline |
Add a callback for the new user appearance event.
- Parameters
-
[in] | callback | Callback to be invoked after the user frame update request, if a new user is detected. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnNewUser
uint64_t tdv::nuitrack::UserTracker::connectOnUpdate |
( |
const OnUpdate & |
callback | ) |
|
|
inline |
Add a callback for the user frame update request.
- Parameters
-
[in] | callback | Callback to be invoked after the user frame update request. |
- Returns
- Callback ID. You can use it to remove the callback.
- See Also
- disconnectOnUpdate
void tdv::nuitrack::UserTracker::disconnectOnLostUser |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the user disappearance event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnLostUser
void tdv::nuitrack::UserTracker::disconnectOnNewUser |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the new user appearance event.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnNewUser
void tdv::nuitrack::UserTracker::disconnectOnUpdate |
( |
uint64_t |
handler | ) |
|
|
inline |
Remove a callback of the user frame update request.
- Parameters
-
[in] | handler | ID of the previously added callback. |
- See Also
- connectOnUpdate
virtual uint64_t tdv::nuitrack::UserTracker::getTimestamp |
( |
| ) |
|
|
inlinevirtual |
Returns the last processed data timestamp in microseconds.
Returns timestamp corresponding to the depth data used in the last user detection.
- Note
- The exact meaning of this value depends on the depth provider.