NITE 1.5.1 - API Reference
|
00001 /******************************************************************************* 00002 * * 00003 * PrimeSense NITE 1.3 * 00004 * Copyright (C) 2010 PrimeSense Ltd. * 00005 * * 00006 *******************************************************************************/ 00007 00008 00009 #ifndef _XNV_GESTURE_H_ 00010 #define _XNV_GESTURE_H_ 00011 #include <XnOpenNI.h> 00012 #include "XnVDeviceControl.h" 00013 00014 class XnVGestureRecognizeSpecificEvent; 00015 class XnVGestureStartRecognizeSpecificEvent; 00016 00020 class XNV_NITE_API XnVGesture : 00021 public XnVContextControl 00022 { 00023 public: 00029 typedef void (XN_CALLBACK_TYPE* GestureRecognizedCB)(const XnChar* strGesture, const XnPoint3D& ptIDPosition, const XnPoint3D& ptEndPosition, void* cxt); 00033 typedef void (XN_CALLBACK_TYPE* GestureStartRecognizedCB)(const XnChar* strGesture, const XnPoint3D& ptPosition, XnFloat fProgress, void* cxt); 00034 00040 XnVGesture(const XnChar* strName = "XnVGesture"); 00041 virtual ~XnVGesture(); 00042 00048 virtual void StartGesture(XnBoundingBox3D* pbbArea = NULL) {} 00052 virtual void StopGesture() {} 00053 00061 void Recognized(const XnChar* strGesture, const XnPoint3D& ptIDPosition, const XnPoint3D& ptEndPosition); 00069 void StartRecognized(const XnChar* strGesture, const XnPoint3D& ptPosition, XnFloat fProgress); 00070 00079 XnCallbackHandle RegisterRecognize(void* cxt, GestureRecognizedCB CB); 00088 XnCallbackHandle RegisterStartRecognize(void* cxt, GestureStartRecognizedCB CB); 00089 00095 void UnregisterRecognize(XnCallbackHandle hCB); 00101 void UnregisterStartRecognize(XnCallbackHandle hCB); 00102 private: 00103 XnVGestureStartRecognizeSpecificEvent* m_pStartRecognizeCBs; 00104 XnVGestureRecognizeSpecificEvent* m_pRecognizeCBs; 00105 }; 00106 00107 #endif