NITE 1.5.1 - API Reference

XnVPointControl Class Reference

#include <XnVPointControl.h>

Inheritance diagram for XnVPointControl:
Collaboration diagram for XnVPointControl:

List of all members.

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

Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

XnVPointControl::XnVPointControl ( const XnChar *  strName = "XnVPointControl")

Constructor. Create a new Point Control

Parameters:
[in]strNameName of the control, for log purposes.
XnVPointControl::~XnVPointControl ( )

Member Function Documentation

XnUInt32 XnVPointControl::GetPrimaryID ( ) const

Get the current primary point ID

Returns:
The Primary Point's 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

Parameters:
[in]pContextThe context of the new Point

Reimplemented in XnVClickableVirtualPlane, XnVMultiProcessFlowServer, XnVPointDenoiser, XnVSteadyDetector, and XnVVirtualCoordinates.

Definition at line 88 of file XnVPointControl.h.

virtual void XnVPointControl::OnPointDestroy ( XnUInt32  nID) [inline, virtual]

Handle a existing Point Destroy event

Parameters:
[in]nIDThe 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

Parameters:
[in]pContextThe context of the Point

Reimplemented in XnVMultiProcessFlowServer, XnVPointDenoiser, XnVSteadyDetector, 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

Parameters:
[in]pContextThe context of the primary point
[in]ptSessionStarterThe point in which the session started

Reimplemented in XnVCircleDetector, XnVMultiProcessFlowServer, XnVPointDenoiser, XnVPushDetector, XnVSelectableSlider1D, XnVSelectableSlider2D, XnVSwipeDetector, and XnVWaveDetector.

Definition at line 108 of file XnVPointControl.h.

virtual void XnVPointControl::OnPrimaryPointDestroy ( XnUInt32  nID) [inline, virtual]

Handle the primary point destruction

Parameters:
[in]nIDThe ID of the last primary point

Reimplemented in XnVCircleDetector, XnVMultiProcessFlowServer, XnVSelectableSlider1D, XnVSelectableSlider2D, XnVSwipeDetector, 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

Parameters:
[in]nOldIdThe previous primary point
[in]pContextThe 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

Parameters:
[in]pContextThe context of the primary point

Reimplemented in XnVCircleDetector, XnVMultiProcessFlowServer, XnVPushDetector, XnVSelectableSlider1D, XnVSelectableSlider2D, XnVSwipeDetector, 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

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterNoPoints ( void *  cxt,
NoPointsCB  CB 
)

Register a callback for when there are no longer any points

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPointCreate ( void *  cxt,
PointCreateCB  CB 
)

Register a callback for when a point is created

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPointDestroy ( void *  cxt,
PointDestroyCB  CB 
)

Register a callback for when a point is destroyed

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPointUpdate ( void *  cxt,
PointUpdateCB  CB 
)

Register a callback for when a point is updated

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPrimaryPointCreate ( void *  cxt,
PrimaryPointCreateCB  CB 
)

Register a callback for when the Primary Point is created

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPrimaryPointDestroy ( void *  cxt,
PrimaryPointDestroyCB  CB 
)

Register a callback for when the Primary Point is destroyed

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPrimaryPointReplace ( void *  cxt,
PrimaryPointReplaceCB  CB 
)

Register a callback for when the Primary Point is replaced

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointControl::RegisterPrimaryPointUpdate ( void *  cxt,
PrimaryPointUpdateCB  CB 
)

Register a callback for when the Primary Point is updated

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
void XnVPointControl::UnregisterHandsUpdate ( XnCallbackHandle  hCB)

Unregister a callback for when multiple hands are available

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterNoPoints ( XnCallbackHandle  hCB)

Unregister a callback for when a point is destroyed

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPointCreate ( XnCallbackHandle  hCB)

Unregister a callback for when a point is created

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPointDestroy ( XnCallbackHandle  hCB)

Unregister a callback for when a point is destroyed

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPointUpdate ( XnCallbackHandle  hCB)

Unregister a callback for when a point is updated

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPrimaryPointCreate ( XnCallbackHandle  hCB)

Unregister a callback for when the Primary Point is created

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPrimaryPointDestroy ( XnCallbackHandle  hCB)

Unregister a callback for when the Primary Point is destroyed

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPrimaryPointReplace ( XnCallbackHandle  hCB)

Unregister a callback for when the Primary Point is replaced

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointControl::UnregisterPrimaryPointUpdate ( XnCallbackHandle  hCB)

Unregister a callback for when the Primary Point is updated

Parameters:
[in]hCBThe 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, XnVPointFilter, and XnVVirtualCoordinates.

virtual void XnVPointControl::Update ( const XnVMultipleHands hands) [virtual]

Handle a Multi Hands. This is the method users will implement.

Reimplemented in XnVMultiProcessFlowServer, XnVPointArea, and XnVVirtualCoordinates.


Member Data Documentation

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.


The documentation for this class was generated from the following file: