NITE 1.5.1 - API Reference

XnVGesture Class Reference

#include <XnVGesture.h>

Inheritance diagram for XnVGesture:
Collaboration diagram for XnVGesture:

List of all members.

Public Types

typedef void(XN_CALLBACK_TYPE * GestureRecognizedCB )(const XnChar *strGesture, const XnPoint3D &ptIDPosition, const XnPoint3D &ptEndPosition, void *cxt)
typedef void(XN_CALLBACK_TYPE * GestureStartRecognizedCB )(const XnChar *strGesture, const XnPoint3D &ptPosition, XnFloat fProgress, void *cxt)

Public Member Functions

 XnVGesture (const XnChar *strName="XnVGesture")
virtual ~XnVGesture ()
virtual void StartGesture (XnBoundingBox3D *pbbArea=NULL)
virtual void StopGesture ()
void Recognized (const XnChar *strGesture, const XnPoint3D &ptIDPosition, const XnPoint3D &ptEndPosition)
void StartRecognized (const XnChar *strGesture, const XnPoint3D &ptPosition, XnFloat fProgress)
XnCallbackHandle RegisterRecognize (void *cxt, GestureRecognizedCB CB)
XnCallbackHandle RegisterStartRecognize (void *cxt, GestureStartRecognizedCB CB)
void UnregisterRecognize (XnCallbackHandle hCB)
void UnregisterStartRecognize (XnCallbackHandle hCB)

Private Attributes

XnVGestureStartRecognizeSpecificEvent * m_pStartRecognizeCBs
XnVGestureRecognizeSpecificEvent * m_pRecognizeCBs

Detailed Description

A XnVGesture is a Context Control, which identifies gestures.

Definition at line 20 of file XnVGesture.h.


Member Typedef Documentation

typedef void(XN_CALLBACK_TYPE* XnVGesture::GestureRecognizedCB)(const XnChar *strGesture, const XnPoint3D &ptIDPosition, const XnPoint3D &ptEndPosition, void *cxt)

Type for a recognized Gesture. It includes the ID of the recognized gesture, the position in which it was identified and the position in which it ended.

Definition at line 29 of file XnVGesture.h.

typedef void(XN_CALLBACK_TYPE* XnVGesture::GestureStartRecognizedCB)(const XnChar *strGesture, const XnPoint3D &ptPosition, XnFloat fProgress, void *cxt)

Type for callbacks that a gesture started to be recognized.

Definition at line 33 of file XnVGesture.h.


Constructor & Destructor Documentation

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

Constructor. Create a new Gesture

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

Member Function Documentation

void XnVGesture::Recognized ( const XnChar *  strGesture,
const XnPoint3D &  ptIDPosition,
const XnPoint3D &  ptEndPosition 
)

Call all callbacks registered to the 'Gesture Recognized' event

Parameters:
[in]strGestureThe name of the recognized gesture
[in]ptIDPositionThe position in which the gesture was recognized
[in]ptEndPositionThe position in which the gesture has ended
XnCallbackHandle XnVGesture::RegisterRecognize ( void *  cxt,
GestureRecognizedCB  CB 
)

Register a callback to the 'Gesture Recognized' event

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 XnVGesture::RegisterStartRecognize ( void *  cxt,
GestureStartRecognizedCB  CB 
)

Register a callback to the 'Gesture Started' event

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.
virtual void XnVGesture::StartGesture ( XnBoundingBox3D *  pbbArea = NULL) [inline, virtual]

Start looking for a gesture, in a specific area (in Real-World coordinates)

Parameters:
[in]pbbAreaThe area in which to look for the gesture. NULL means all over

Definition at line 48 of file XnVGesture.h.

void XnVGesture::StartRecognized ( const XnChar *  strGesture,
const XnPoint3D &  ptPosition,
XnFloat  fProgress 
)

Call all callbacks registered to the 'Gesture Started' event

Parameters:
[in]strGestureThe name of the started gesture
[in]ptPositionThe position in which the gesture started
[in]fProgressHow much of the gesture was already completed
virtual void XnVGesture::StopGesture ( ) [inline, virtual]

Stop looking for the gesture

Definition at line 52 of file XnVGesture.h.

void XnVGesture::UnregisterRecognize ( XnCallbackHandle  hCB)

Unregister a callback from the 'Gesture Recognized' event

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

Unregister a callback from the 'Gesture Started' event

Parameters:
[in]hCBThe handle received when registering the callback.

Member Data Documentation

XnVGestureRecognizeSpecificEvent* XnVGesture::m_pRecognizeCBs [private]

Definition at line 104 of file XnVGesture.h.

XnVGestureStartRecognizeSpecificEvent* XnVGesture::m_pStartRecognizeCBs [private]

Definition at line 103 of file XnVGesture.h.


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