NITE 1.5.1 - API Reference
|
#include <XnVClickableVirtualPlane.h>
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 |
This is a specific virtual coordinates, which can freeze points to allow a comfortable click.
Definition at line 32 of file XnVClickableVirtualPlane.h.
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.
XnVClickableVirtualPlane::XnVClickableVirtualPlane | ( | const XnChar * | strINI, |
const XnChar * | strName = "XnVClickableVirtualPlane" |
||
) |
Constructor. Create an instance, using the configuration file supplied as parameter.
[in] | strINI | Configuration INI file |
[in] | strName | Name of the control, for log purposes. |
void XnVClickableVirtualPlane::Click | ( | XnUInt32 | , |
const XnPoint3D & | ptPosition | ||
) |
Invoke the click event
[in] | ptPosition | The position of the click |
void XnVClickableVirtualPlane::FreezeCoordinates | ( | XnUInt32 | nID, |
const XnPoint3D & | ptPosition | ||
) |
Freeze the coordinates - a click is starting.
[in] | nID | The ID of the point to freeze |
[in] | ptPosition | The coordinates to send from now on |
XnBool XnVClickableVirtualPlane::IsFrozen | ( | XnUInt32 | nID | ) | const |
Check if a specific point is frozen
[in] | nID | The ID the point |
void XnVClickableVirtualPlane::OnPointCreate | ( | const XnVHandPointContext * | pContext | ) | [virtual] |
Called when a point is created.
[in] | pContext | The hand context of the newly created point |
Reimplemented from XnVVirtualCoordinates.
void XnVClickableVirtualPlane::OnPointDestroy | ( | XnUInt32 | nID | ) | [virtual] |
Called when a point is destroyed.
[in] | nID | the ID of the destroyed point |
Reimplemented from XnVVirtualCoordinates.
XnCallbackHandle XnVClickableVirtualPlane::RegisterClick | ( | void * | cxt, |
ClickCB | CB | ||
) |
Register for the click event
[in] | cxt | User's context |
[in] | CB | The Callback to call when the event is invoked. |
void XnVClickableVirtualPlane::UnfreezeCoordinates | ( | XnUInt32 | nID | ) |
Unfreeze the coordinates - a click is no longer searched.
[in] | nID | The ID of the point to unfreeze. |
void XnVClickableVirtualPlane::UnregisterClick | ( | XnCallbackHandle | hCB | ) |
Unregister from the click event
[in] | hCB | The handle provided on registration. |
void XnVClickableVirtualPlane::UpdateVirtualPoint | ( | XnVVirtualCoordinatesInternal * | pVC, |
const XnVHandPointContext * | pContext, | ||
XnVHandPointContext * | pLocalContext | ||
) | [protected, virtual] |
Reimplemented from XnVVirtualCoordinates.
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.