NITE 1.5.1 - API Reference

XnVClickableVirtualPlane Class Reference

#include <XnVClickableVirtualPlane.h>

Inheritance diagram for XnVClickableVirtualPlane:
Collaboration diagram for XnVClickableVirtualPlane:

List of all members.

Public Types

typedef void(XN_CALLBACK_TYPE * ClickCB )(XnUInt32 nID, const XnPoint3D &ptPosition, void *cxt)

Public Member Functions

 XnVClickableVirtualPlane (const XnChar *strINI, const XnChar *strName="XnVClickableVirtualPlane")
 ~XnVClickableVirtualPlane ()
XnCallbackHandle RegisterClick (void *cxt, ClickCB CB)
void UnregisterClick (XnCallbackHandle hCB)
void Click (XnUInt32, const XnPoint3D &ptPosition)
void OnPointCreate (const XnVHandPointContext *pContext)
void OnPointDestroy (XnUInt32 nID)
void FreezeCoordinates (XnUInt32 nID, const XnPoint3D &ptPosition)
void UnfreezeCoordinates (XnUInt32 nID)
XnBool IsFrozen (XnUInt32 nID) const

Protected Member Functions

void UpdateVirtualPoint (XnVVirtualCoordinatesInternal *pVC, const XnVHandPointContext *pContext, XnVHandPointContext *pLocalContext)

Protected Attributes

XnVIntPointHash * m_pFrozenPoints
XnVIntIDHash * m_pIDContexts
XnVUintPointSpecificEvent * m_pClickCBs

Detailed Description

This is a specific virtual coordinates, which can freeze points to allow a comfortable click.

Definition at line 32 of file XnVClickableVirtualPlane.h.


Member Typedef Documentation

typedef void(XN_CALLBACK_TYPE* XnVClickableVirtualPlane::ClickCB)(XnUInt32 nID, const XnPoint3D &ptPosition, void *cxt)

Type for recognizing a click relative to the virtual plane.

Definition at line 39 of file XnVClickableVirtualPlane.h.


Constructor & Destructor Documentation

XnVClickableVirtualPlane::XnVClickableVirtualPlane ( const XnChar *  strINI,
const XnChar *  strName = "XnVClickableVirtualPlane" 
)

Constructor. Create an instance, using the configuration file supplied as parameter.

Parameters:
[in]strINIConfiguration INI file
[in]strNameName of the control, for log purposes.
XnVClickableVirtualPlane::~XnVClickableVirtualPlane ( )

Member Function Documentation

void XnVClickableVirtualPlane::Click ( XnUInt32  ,
const XnPoint3D &  ptPosition 
)

Invoke the click event

Parameters:
[in]ptPositionThe position of the click
void XnVClickableVirtualPlane::FreezeCoordinates ( XnUInt32  nID,
const XnPoint3D &  ptPosition 
)

Freeze the coordinates - a click is starting.

Parameters:
[in]nIDThe ID of the point to freeze
[in]ptPositionThe coordinates to send from now on
XnBool XnVClickableVirtualPlane::IsFrozen ( XnUInt32  nID) const

Check if a specific point is frozen

Parameters:
[in]nIDThe ID the point
Returns:
TRUE if the point is frozen, FALSE o/w
void XnVClickableVirtualPlane::OnPointCreate ( const XnVHandPointContext pContext) [virtual]

Called when a point is created.

Parameters:
[in]pContextThe hand context of the newly created point

Reimplemented from XnVVirtualCoordinates.

void XnVClickableVirtualPlane::OnPointDestroy ( XnUInt32  nID) [virtual]

Called when a point is destroyed.

Parameters:
[in]nIDthe ID of the destroyed point

Reimplemented from XnVVirtualCoordinates.

XnCallbackHandle XnVClickableVirtualPlane::RegisterClick ( void *  cxt,
ClickCB  CB 
)

Register for the click event

Parameters:
[in]cxtUser's context
[in]CBThe Callback to call when the event is invoked.
Returns:
A handle, to allow unregistration.
void XnVClickableVirtualPlane::UnfreezeCoordinates ( XnUInt32  nID)

Unfreeze the coordinates - a click is no longer searched.

Parameters:
[in]nIDThe ID of the point to unfreeze.
void XnVClickableVirtualPlane::UnregisterClick ( XnCallbackHandle  hCB)

Unregister from the click event

Parameters:
[in]hCBThe handle provided on registration.
void XnVClickableVirtualPlane::UpdateVirtualPoint ( XnVVirtualCoordinatesInternal *  pVC,
const XnVHandPointContext pContext,
XnVHandPointContext pLocalContext 
) [protected, virtual]

Reimplemented from XnVVirtualCoordinates.


Member Data Documentation

XnVUintPointSpecificEvent* XnVClickableVirtualPlane::m_pClickCBs [protected]

Definition at line 113 of file XnVClickableVirtualPlane.h.

XnVIntPointHash* XnVClickableVirtualPlane::m_pFrozenPoints [protected]

Definition at line 110 of file XnVClickableVirtualPlane.h.

XnVIntIDHash* XnVClickableVirtualPlane::m_pIDContexts [protected]

Definition at line 111 of file XnVClickableVirtualPlane.h.


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