Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _XNV_GESTURE_H_
00010 #define _XNV_GESTURE_H_
00011 #include <XnOpenNI.h>
00012
00013 #include "XnVDeviceControl.h"
00014
00018 class XNV_NITE_API XnVGesture :
00019 public XnVContextControl
00020 {
00021 public:
00027 typedef void (XN_CALLBACK_TYPE* GestureRecognizedCB)(const XnChar* strGesture, const XnPoint3D& ptIDPosition, const XnPoint3D& ptEndPosition, void* cxt);
00031 typedef void (XN_CALLBACK_TYPE* GestureStartRecognizedCB)(const XnChar* strGesture, const XnPoint3D& ptPosition, XnFloat fProgress, void* cxt);
00032
00038 XnVGesture(const XnChar* strName = "XnVGesture");
00039 virtual ~XnVGesture();
00040
00046 virtual void StartGesture(XnBoundingBox3D* pbbArea = NULL) {}
00050 virtual void StopGesture() {}
00051
00059 void Recognized(const XnChar* strGesture, const XnPoint3D& ptIDPosition, const XnPoint3D& ptEndPosition);
00067 void StartRecognized(const XnChar* strGesture, const XnPoint3D& ptPosition, XnFloat fProgress);
00068
00077 XnCallbackHandle RegisterRecognize(void* cxt, GestureRecognizedCB CB);
00086 XnCallbackHandle RegisterStartRecognize(void* cxt, GestureStartRecognizedCB CB);
00087
00093 void UnregisterRecognize(XnCallbackHandle hCB);
00099 void UnregisterStartRecognize(XnCallbackHandle hCB);
00100 private:
00101 XN_DECLARE_EVENT_3ARG(XnVGestureRecognizeSpecificEvent, XnVGestureRecognizeEvent, const XnChar*, strGesture, const XnPoint3D&, ptIDPos, const XnPoint3D&, ptEndPos);
00102 XN_DECLARE_EVENT_3ARG(XnVGestureStartRecognizeSpecificEvent, XnVGestureStartRecognizeEvent, const XnChar*, strGesture, const XnPoint3D&, ptPos, XnFloat, fProgress);
00103 XnVGestureStartRecognizeSpecificEvent m_StartRecognizeCBs;
00104 XnVGestureRecognizeSpecificEvent m_RecognizeCBs;
00105 };
00106
00107 #endif