NITE 1.5.1 - API Reference
|
#include <XnVPointControl.h>
Public Types | |
typedef void(XN_CALLBACK_TYPE * | PointCreateCB )(const XnVHandPointContext *pContext, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PointUpdateCB )(const XnVHandPointContext *pContext, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PointDestroyCB )(XnUInt32 nID, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PrimaryPointCreateCB )(const XnVHandPointContext *pContext, const XnPoint3D &ptFocus, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PrimaryPointUpdateCB )(const XnVHandPointContext *pContext, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PrimaryPointReplaceCB )(XnUInt32 nOldId, const XnVHandPointContext *pContext, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | PrimaryPointDestroyCB )(XnUInt32 nID, void *cxt) |
typedef void(XN_CALLBACK_TYPE * | NoPointsCB )(void *cxt) |
typedef void(XN_CALLBACK_TYPE * | HandsUpdateCB )(const XnVMultipleHands &mh, void *cxt) |
Public Member Functions | |
XnVPointControl (const XnChar *strName="XnVPointControl") | |
~XnVPointControl () | |
void | Update (XnVMessage *pMessage) |
virtual void | Update (const XnVMultipleHands &hands) |
virtual void | OnPointCreate (const XnVHandPointContext *pContext) |
virtual void | OnPointUpdate (const XnVHandPointContext *pContext) |
virtual void | OnPointDestroy (XnUInt32 nID) |
virtual void | OnPrimaryPointCreate (const XnVHandPointContext *pContext, const XnPoint3D &ptSessionStarter) |
virtual void | OnPrimaryPointUpdate (const XnVHandPointContext *pContext) |
virtual void | OnPrimaryPointReplace (XnUInt32 nOldId, const XnVHandPointContext *pContext) |
virtual void | OnPrimaryPointDestroy (XnUInt32 nID) |
virtual void | OnNoPoints () |
XnCallbackHandle | RegisterPointCreate (void *cxt, PointCreateCB CB) |
XnCallbackHandle | RegisterPointUpdate (void *cxt, PointUpdateCB CB) |
XnCallbackHandle | RegisterPointDestroy (void *cxt, PointDestroyCB CB) |
XnCallbackHandle | RegisterPrimaryPointCreate (void *cxt, PrimaryPointCreateCB CB) |
XnCallbackHandle | RegisterPrimaryPointUpdate (void *cxt, PrimaryPointUpdateCB CB) |
XnCallbackHandle | RegisterPrimaryPointReplace (void *cxt, PrimaryPointReplaceCB CB) |
XnCallbackHandle | RegisterPrimaryPointDestroy (void *cxt, PrimaryPointDestroyCB CB) |
XnCallbackHandle | RegisterNoPoints (void *cxt, NoPointsCB CB) |
XnCallbackHandle | RegisterHandsUpdate (void *cxt, HandsUpdateCB CB) |
void | UnregisterPointCreate (XnCallbackHandle hCB) |
void | UnregisterPointUpdate (XnCallbackHandle hCB) |
void | UnregisterPointDestroy (XnCallbackHandle hCB) |
void | UnregisterPrimaryPointCreate (XnCallbackHandle hCB) |
void | UnregisterPrimaryPointUpdate (XnCallbackHandle hCB) |
void | UnregisterPrimaryPointReplace (XnCallbackHandle hCB) |
void | UnregisterPrimaryPointDestroy (XnCallbackHandle hCB) |
void | UnregisterNoPoints (XnCallbackHandle hCB) |
void | UnregisterHandsUpdate (XnCallbackHandle hCB) |
XnUInt32 | GetPrimaryID () const |
Protected Attributes | |
XnUInt32 | m_nOverridePrimary |
Private Attributes | |
XnVHandPointContextSpecificEvent * | m_pPointCreateCBs |
XnVHandPointContextSpecificEvent * | m_pPointUpdateCBs |
XnVUintSpecificEvent * | m_pPointDestroyCBs |
XnVHandPointContextPointSpecificEvent * | m_pPrimaryPointCreateCBs |
XnVHandPointContextSpecificEvent * | m_pPrimaryPointUpdateCBs |
XnVUintHandPointContextSpecificEvent * | m_pPrimaryPointReplaceCBs |
XnVUintSpecificEvent * | m_pPrimaryPointDestroyCBs |
XnVEvent * | m_pNoPointsCBs |
XnVMultipleHandsSpecificEvent * | m_pHandsUpdateCBs |
XnUInt32 | m_nPrimaryID |
A XnVPointControl is a Message Listener that expects Point Messages. It is meant to be a base class for Controls that are Point-based.
Definition at line 26 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::HandsUpdateCB)(const XnVMultipleHands &mh, void *cxt) |
Type for Multiple Hands callbacks
Definition at line 65 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::NoPointsCB)(void *cxt) |
Definition at line 60 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointCreateCB)(const XnVHandPointContext *pContext, void *cxt) |
Type for Point Create callbacks
Definition at line 33 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointDestroyCB)(XnUInt32 nID, void *cxt) |
Type for Point Destroy callbacks
Definition at line 41 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointUpdateCB)(const XnVHandPointContext *pContext, void *cxt) |
Type for Point Update callbacks
Definition at line 37 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PrimaryPointCreateCB)(const XnVHandPointContext *pContext, const XnPoint3D &ptFocus, void *cxt) |
Type for Primary Point Create callbacks
Definition at line 46 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PrimaryPointDestroyCB)(XnUInt32 nID, void *cxt) |
Type for Primary Point Destroy callbacks
Definition at line 58 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PrimaryPointReplaceCB)(XnUInt32 nOldId, const XnVHandPointContext *pContext, void *cxt) |
Type for Primary Point Replace callbacks
Definition at line 54 of file XnVPointControl.h.
typedef void(XN_CALLBACK_TYPE* XnVPointControl::PrimaryPointUpdateCB)(const XnVHandPointContext *pContext, void *cxt) |
Type for Primary Point Update callbacks
Definition at line 50 of file XnVPointControl.h.
XnVPointControl::XnVPointControl | ( | const XnChar * | strName = "XnVPointControl" | ) |
Constructor. Create a new Point Control
[in] | strName | Name of the control, for log purposes. |
XnUInt32 XnVPointControl::GetPrimaryID | ( | ) | const |
Get the current primary point ID
virtual void XnVPointControl::OnNoPoints | ( | ) | [inline, virtual] |
There are no more points
Definition at line 132 of file XnVPointControl.h.
virtual void XnVPointControl::OnPointCreate | ( | const XnVHandPointContext * | pContext | ) | [inline, virtual] |
Handle a new Point Create event
[in] | pContext | The context of the new Point |
Reimplemented in XnVSteadyDetector, XnVClickableVirtualPlane, XnVMultiProcessFlowServer, XnVPointDenoiser, and XnVVirtualCoordinates.
Definition at line 88 of file XnVPointControl.h.
virtual void XnVPointControl::OnPointDestroy | ( | XnUInt32 | nID | ) | [inline, virtual] |
Handle a existing Point Destroy event
[in] | nID | The ID of the destroyed Point |
Reimplemented in XnVClickableVirtualPlane, XnVMultiProcessFlowServer, XnVPointDenoiser, and XnVVirtualCoordinates.
Definition at line 100 of file XnVPointControl.h.
virtual void XnVPointControl::OnPointUpdate | ( | const XnVHandPointContext * | pContext | ) | [inline, virtual] |
Handle an existing Point Update event
[in] | pContext | The context of the Point |
Reimplemented in XnVSteadyDetector, XnVMultiProcessFlowServer, XnVPointDenoiser, and XnVVirtualCoordinates.
Definition at line 94 of file XnVPointControl.h.
virtual void XnVPointControl::OnPrimaryPointCreate | ( | const XnVHandPointContext * | pContext, |
const XnPoint3D & | ptSessionStarter | ||
) | [inline, virtual] |
Handle the primary point create
[in] | pContext | The context of the primary point |
[in] | ptSessionStarter | The point in which the session started |
Reimplemented in XnVSelectableSlider1D, XnVSelectableSlider2D, XnVCircleDetector, XnVMultiProcessFlowServer, XnVPointDenoiser, XnVSwipeDetector, XnVPushDetector, and XnVWaveDetector.
Definition at line 108 of file XnVPointControl.h.
virtual void XnVPointControl::OnPrimaryPointDestroy | ( | XnUInt32 | nID | ) | [inline, virtual] |
Handle the primary point destruction
[in] | nID | The ID of the last primary point |
Reimplemented in XnVSelectableSlider1D, XnVSelectableSlider2D, XnVCircleDetector, XnVSwipeDetector, XnVMultiProcessFlowServer, and XnVWaveDetector.
Definition at line 127 of file XnVPointControl.h.
virtual void XnVPointControl::OnPrimaryPointReplace | ( | XnUInt32 | nOldId, |
const XnVHandPointContext * | pContext | ||
) | [inline, virtual] |
Handle a change of the Primary Point
[in] | nOldId | The previous primary point |
[in] | pContext | The context of the new primary point |
Reimplemented in XnVSwipeDetector, and XnVWaveDetector.
Definition at line 121 of file XnVPointControl.h.
virtual void XnVPointControl::OnPrimaryPointUpdate | ( | const XnVHandPointContext * | pContext | ) | [inline, virtual] |
Handle an update of the Primary Point
[in] | pContext | The context of the primary point |
Reimplemented in XnVSelectableSlider1D, XnVSelectableSlider2D, XnVCircleDetector, XnVMultiProcessFlowServer, XnVSwipeDetector, XnVPushDetector, and XnVWaveDetector.
Definition at line 114 of file XnVPointControl.h.
XnCallbackHandle XnVPointControl::RegisterHandsUpdate | ( | void * | cxt, |
HandsUpdateCB | CB | ||
) |
Register a callback for when multiple hands are available
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterNoPoints | ( | void * | cxt, |
NoPointsCB | CB | ||
) |
Register a callback for when there are no longer any points
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPointCreate | ( | void * | cxt, |
PointCreateCB | CB | ||
) |
Register a callback for when a point is created
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPointDestroy | ( | void * | cxt, |
PointDestroyCB | CB | ||
) |
Register a callback for when a point is destroyed
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPointUpdate | ( | void * | cxt, |
PointUpdateCB | CB | ||
) |
Register a callback for when a point is updated
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPrimaryPointCreate | ( | void * | cxt, |
PrimaryPointCreateCB | CB | ||
) |
Register a callback for when the Primary Point is created
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPrimaryPointDestroy | ( | void * | cxt, |
PrimaryPointDestroyCB | CB | ||
) |
Register a callback for when the Primary Point is destroyed
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPrimaryPointReplace | ( | void * | cxt, |
PrimaryPointReplaceCB | CB | ||
) |
Register a callback for when the Primary Point is replaced
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
XnCallbackHandle XnVPointControl::RegisterPrimaryPointUpdate | ( | void * | cxt, |
PrimaryPointUpdateCB | CB | ||
) |
Register a callback for when the Primary Point is updated
[in] | cxt | User's context. The callback will be called with that context. |
[in] | CB | The Callback |
void XnVPointControl::UnregisterHandsUpdate | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when multiple hands are available
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterNoPoints | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when a point is destroyed
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPointCreate | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when a point is created
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPointDestroy | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when a point is destroyed
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPointUpdate | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when a point is updated
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPrimaryPointCreate | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when the Primary Point is created
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPrimaryPointDestroy | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when the Primary Point is destroyed
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPrimaryPointReplace | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when the Primary Point is replaced
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::UnregisterPrimaryPointUpdate | ( | XnCallbackHandle | hCB | ) |
Unregister a callback for when the Primary Point is updated
[in] | hCB | The handle received when registering the callback. |
void XnVPointControl::Update | ( | XnVMessage * | pMessage | ) | [virtual] |
Handle a Message. This method extracts the inner Multi Hands, and calls the other Update method.
Implements XnVMessageListener.
Reimplemented in XnVPointArea, XnVPointDenoiser, XnVVirtualCoordinates, and XnVPointFilter.
virtual void XnVPointControl::Update | ( | const XnVMultipleHands & | hands | ) | [virtual] |
Handle a Multi Hands. This is the method users will implement.
Reimplemented in XnVPointArea, XnVMultiProcessFlowServer, and XnVVirtualCoordinates.
XnUInt32 XnVPointControl::m_nOverridePrimary [protected] |
Definition at line 297 of file XnVPointControl.h.
XnUInt32 XnVPointControl::m_nPrimaryID [private] |
Definition at line 295 of file XnVPointControl.h.
XnVMultipleHandsSpecificEvent* XnVPointControl::m_pHandsUpdateCBs [private] |
Definition at line 293 of file XnVPointControl.h.
XnVEvent* XnVPointControl::m_pNoPointsCBs [private] |
Definition at line 291 of file XnVPointControl.h.
XnVHandPointContextSpecificEvent* XnVPointControl::m_pPointCreateCBs [private] |
Definition at line 282 of file XnVPointControl.h.
XnVUintSpecificEvent* XnVPointControl::m_pPointDestroyCBs [private] |
Definition at line 284 of file XnVPointControl.h.
XnVHandPointContextSpecificEvent* XnVPointControl::m_pPointUpdateCBs [private] |
Definition at line 283 of file XnVPointControl.h.
XnVHandPointContextPointSpecificEvent* XnVPointControl::m_pPrimaryPointCreateCBs [private] |
Definition at line 286 of file XnVPointControl.h.
XnVUintSpecificEvent* XnVPointControl::m_pPrimaryPointDestroyCBs [private] |
Definition at line 289 of file XnVPointControl.h.
XnVUintHandPointContextSpecificEvent* XnVPointControl::m_pPrimaryPointReplaceCBs [private] |
Definition at line 288 of file XnVPointControl.h.
XnVHandPointContextSpecificEvent* XnVPointControl::m_pPrimaryPointUpdateCBs [private] |
Definition at line 287 of file XnVPointControl.h.