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

XnVClickableVirtualPlane Class Reference

#include <XnVClickableVirtualPlane.h>

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

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

 XN_DECLARE_DEFAULT_HASH_DECL (XNV_NITE_API, XnUInt32, XnPoint3D *, XnVIntPointHash)
 XN_DECLARE_DEFAULT_HASH_DECL (XNV_NITE_API, XnUInt32, XnVClickableID *, XnVIntIDHash)
void UpdateVirtualPoint (XnVVirtualCoordinatesInternal *pVC, const XnVHandPointContext *pContext, XnVHandPointContext *pLocalContext)

Protected Attributes

XnVIntPointHash m_FrozenPoints
XnVIntIDHash m_IDContexts
XnVUintPointSpecificEvent m_ClickCBs

Detailed Description

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

Definition at line 28 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 35 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] strINI Configuration INI file
[in] strName Name of the control, for log purposes.
XnVClickableVirtualPlane::~XnVClickableVirtualPlane (  ) 

Member Function Documentation

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

Invoke the click event

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

Freeze the coordinates - a click is starting.

Parameters:
[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

Parameters:
[in] nID The 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] pContext The hand context of the newly created point

Reimplemented from XnVVirtualCoordinates.

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

Called when a point is destroyed.

Parameters:
[in] nID the ID of the destroyed point

Reimplemented from XnVVirtualCoordinates.

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

Register for the click event

Parameters:
[in] cxt User's context
[in] CB The 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] nID The ID of the point to unfreeze.
void XnVClickableVirtualPlane::UnregisterClick ( XnCallbackHandle  hCB  ) 

Unregister from the click event

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

Reimplemented from XnVVirtualCoordinates.

XnVClickableVirtualPlane::XN_DECLARE_DEFAULT_HASH_DECL ( XNV_NITE_API  ,
XnUInt32  ,
XnVClickableID ,
XnVIntIDHash   
) [protected]
XnVClickableVirtualPlane::XN_DECLARE_DEFAULT_HASH_DECL ( XNV_NITE_API  ,
XnUInt32  ,
XnPoint3D *  ,
XnVIntPointHash   
) [protected]

Member Data Documentation

XnVUintPointSpecificEvent XnVClickableVirtualPlane::m_ClickCBs [protected]

Definition at line 112 of file XnVClickableVirtualPlane.h.

XnVIntPointHash XnVClickableVirtualPlane::m_FrozenPoints [protected]

Definition at line 109 of file XnVClickableVirtualPlane.h.

XnVIntIDHash XnVClickableVirtualPlane::m_IDContexts [protected]

Definition at line 110 of file XnVClickableVirtualPlane.h.


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