Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

XnVPointControl Class Reference

#include <XnVPointControl.h>

Inheritance diagram for XnVPointControl:
Inheritance graph
[legend]
Collaboration diagram for XnVPointControl:
Collaboration graph
[legend]

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 Member Functions

 XN_DECLARE_EVENT_1ARG (XnVHandPointContextSpecificEvent, XnVHandPointContextEvent, const XnVHandPointContext *, pContext)
 XN_DECLARE_EVENT_1ARG (XnVMultipleHandsSpecificEvent, XnVMultipleHandsEvent, const XnVMultipleHands &, pContext)
 XN_DECLARE_EVENT_2ARG (XnVHandPointContextPointSpecificEvent, XnVHandPointContextPointEvent, const XnVHandPointContext *, pContext, const XnPoint3D &, ptPos)
 XN_DECLARE_EVENT_2ARG (XnVUintHandPointContextSpecificEvent, XnVUintHandPointContextEvent, XnUInt32, nValue, const XnVHandPointContext *, pContext)

Private Attributes

XnVHandPointContextSpecificEvent m_PointCreateCBs
XnVHandPointContextSpecificEvent m_PointUpdateCBs
XnVUintSpecificEvent m_PointDestroyCBs
XnVHandPointContextPointSpecificEvent m_PrimaryPointCreateCBs
XnVHandPointContextSpecificEvent m_PrimaryPointUpdateCBs
XnVUintHandPointContextSpecificEvent m_PrimaryPointReplaceCBs
XnVUintSpecificEvent m_PrimaryPointDestroyCBs
XnVEvent m_NoPointsCBs
XnVMultipleHandsSpecificEvent m_HandsUpdateCBs
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 19 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 58 of file XnVPointControl.h.

typedef void(XN_CALLBACK_TYPE* XnVPointControl::NoPointsCB)(void *cxt)

Definition at line 53 of file XnVPointControl.h.

typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointCreateCB)(const XnVHandPointContext *pContext, void *cxt)

Type for Point Create callbacks

Definition at line 26 of file XnVPointControl.h.

typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointDestroyCB)(XnUInt32 nID, void *cxt)

Type for Point Destroy callbacks

Definition at line 34 of file XnVPointControl.h.

typedef void(XN_CALLBACK_TYPE* XnVPointControl::PointUpdateCB)(const XnVHandPointContext *pContext, void *cxt)

Type for Point Update callbacks

Definition at line 30 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 39 of file XnVPointControl.h.

typedef void(XN_CALLBACK_TYPE* XnVPointControl::PrimaryPointDestroyCB)(XnUInt32 nID, void *cxt)

Type for Primary Point Destroy callbacks

Definition at line 51 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 47 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 43 of file XnVPointControl.h.


Constructor & Destructor Documentation

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

Constructor. Create a new Point Control

Parameters:
[in] strName Name 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 125 of file XnVPointControl.h.

virtual void XnVPointControl::OnPointCreate ( const XnVHandPointContext pContext  )  [inline, virtual]

Handle a new Point Create event

Parameters:
[in] pContext The context of the new Point

Reimplemented in XnVClickableVirtualPlane, XnVPointDenoiser, XnVSteadyDetector, and XnVVirtualCoordinates.

Definition at line 81 of file XnVPointControl.h.

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

Handle a existing Point Destroy event

Parameters:
[in] nID The ID of the destroyed Point

Reimplemented in XnVClickableVirtualPlane, XnVPointDenoiser, and XnVVirtualCoordinates.

Definition at line 93 of file XnVPointControl.h.

virtual void XnVPointControl::OnPointUpdate ( const XnVHandPointContext pContext  )  [inline, virtual]

Handle an existing Point Update event

Parameters:
[in] pContext The context of the Point

Reimplemented in XnVPointDenoiser, XnVSteadyDetector, and XnVVirtualCoordinates.

Definition at line 87 of file XnVPointControl.h.

virtual void XnVPointControl::OnPrimaryPointCreate ( const XnVHandPointContext pContext,
const XnPoint3D &  ptSessionStarter 
) [inline, virtual]

Handle the primary point create

Parameters:
[in] pContext The context of the primary point
[in] ptSessionStarter The point in which the session started

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

Definition at line 101 of file XnVPointControl.h.

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

Handle the primary point destruction

Parameters:
[in] nID The ID of the last primary point

Reimplemented in XnVCircleDetector, XnVSelectableSlider1D, XnVSelectableSlider2D, XnVSwipeDetector, and XnVWaveDetector.

Definition at line 120 of file XnVPointControl.h.

virtual void XnVPointControl::OnPrimaryPointReplace ( XnUInt32  nOldId,
const XnVHandPointContext pContext 
) [inline, virtual]

Handle a change of the Primary Point

Parameters:
[in] nOldId The previous primary point
[in] pContext The context of the new primary point

Reimplemented in XnVSwipeDetector, and XnVWaveDetector.

Definition at line 114 of file XnVPointControl.h.

virtual void XnVPointControl::OnPrimaryPointUpdate ( const XnVHandPointContext pContext  )  [inline, virtual]

Handle an update of the Primary Point

Parameters:
[in] pContext The context of the primary point

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

Definition at line 107 of file XnVPointControl.h.

XnCallbackHandle XnVPointControl::RegisterHandsUpdate ( void *  cxt,
HandsUpdateCB  CB 
)

Register a callback for when multiple hands are available

Parameters:
[in] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] hCB The handle received when registering the callback.
void XnVPointControl::UnregisterNoPoints ( XnCallbackHandle  hCB  ) 

Unregister a callback for when a point is destroyed

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

Unregister a callback for when a point is created

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

Unregister a callback for when a point is destroyed

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

Unregister a callback for when a point is updated

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

Unregister a callback for when the Primary Point is created

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

Unregister a callback for when the Primary Point is destroyed

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

Unregister a callback for when the Primary Point is replaced

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

Unregister a callback for when the Primary Point is updated

Parameters:
[in] hCB The handle received when registering the callback.
virtual void XnVPointControl::Update ( const XnVMultipleHands hands  )  [virtual]

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

Reimplemented in XnVPointArea, and XnVVirtualCoordinates.

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.

XnVPointControl::XN_DECLARE_EVENT_1ARG ( XnVMultipleHandsSpecificEvent  ,
XnVMultipleHandsEvent  ,
const XnVMultipleHands ,
pContext   
) [private]
XnVPointControl::XN_DECLARE_EVENT_1ARG ( XnVHandPointContextSpecificEvent  ,
XnVHandPointContextEvent  ,
const XnVHandPointContext ,
pContext   
) [private]
XnVPointControl::XN_DECLARE_EVENT_2ARG ( XnVHandPointContextPointSpecificEvent  ,
XnVHandPointContextPointEvent  ,
const XnVHandPointContext ,
pContext  ,
const XnPoint3D &  ,
ptPos   
) [private]
XnVPointControl::XN_DECLARE_EVENT_2ARG ( XnVUintHandPointContextSpecificEvent  ,
XnVUintHandPointContextEvent  ,
XnUInt32  ,
nValue  ,
const XnVHandPointContext ,
pContext   
) [private]

Member Data Documentation

XnVMultipleHandsSpecificEvent XnVPointControl::m_HandsUpdateCBs [private]

Definition at line 292 of file XnVPointControl.h.

XnVEvent XnVPointControl::m_NoPointsCBs [private]

Definition at line 290 of file XnVPointControl.h.

Definition at line 296 of file XnVPointControl.h.

XnUInt32 XnVPointControl::m_nPrimaryID [private]

Definition at line 294 of file XnVPointControl.h.

XnVHandPointContextSpecificEvent XnVPointControl::m_PointCreateCBs [private]

Definition at line 281 of file XnVPointControl.h.

XnVUintSpecificEvent XnVPointControl::m_PointDestroyCBs [private]

Definition at line 283 of file XnVPointControl.h.

XnVHandPointContextSpecificEvent XnVPointControl::m_PointUpdateCBs [private]

Definition at line 282 of file XnVPointControl.h.

XnVHandPointContextPointSpecificEvent XnVPointControl::m_PrimaryPointCreateCBs [private]

Definition at line 285 of file XnVPointControl.h.

XnVUintSpecificEvent XnVPointControl::m_PrimaryPointDestroyCBs [private]

Definition at line 288 of file XnVPointControl.h.

XnVUintHandPointContextSpecificEvent XnVPointControl::m_PrimaryPointReplaceCBs [private]

Definition at line 287 of file XnVPointControl.h.

XnVHandPointContextSpecificEvent XnVPointControl::m_PrimaryPointUpdateCBs [private]

Definition at line 286 of file XnVPointControl.h.


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