• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

XnVPointArea.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *                                                                              *
00003 *   PrimeSense NITE 1.3                                                        *
00004 *   Copyright (C) 2010 PrimeSense Ltd.                                         *
00005 *                                                                              *
00006 *******************************************************************************/
00007 
00008 
00009 #ifndef _XNV_POINT_AREA_H_
00010 #define _XNV_POINT_AREA_H_
00011 
00012 #include "XnVPointFilter.h"
00013 #include "XnVSessionGenerator.h"
00014 #include "XnVPointTracker.h"
00015 
00021 class XNV_NITE_API XnVPointArea :
00022     public XnVPointFilter
00023 {
00024 public:
00028     typedef void (XN_CALLBACK_TYPE*PointSilencedCB)(XnUInt32 nID, void* cxt);
00032     typedef void (XN_CALLBACK_TYPE*PointRevivedCB)(XnUInt32 nID, void* cxt);
00036     typedef void (XN_CALLBACK_TYPE*SilentPointRemovedCB)(XnUInt32 nID, void* cxt);
00037 
00045     XnVPointArea(const XnBoundingBox3D& bbArea, XnBool bRelative = false, const XnChar* strName = "XnVPointArea");
00054     XnVPointArea(const XnPoint3D& ptMins, const XnPoint3D& ptMaxs, XnBool bRelative = false, const XnChar* strName = "XnVPointArea");
00055 
00062     void ChangeArea(const XnBoundingBox3D& bbArea, XnBool bRelative = false);
00070     void ChangeArea(const XnPoint3D& ptMins, const XnPoint3D& ptMaxs, XnBool bRelative = false);
00071 
00077     void Update(XnVMessage* pMessage);
00083     void Update(const XnVMultipleHands& hands);
00084 
00093     XnCallbackHandle RegisterPointSilenced(void* cxt, PointSilencedCB CB);
00102     XnCallbackHandle RegisterPointRevived(void* cxt, PointRevivedCB CB);
00111     XnCallbackHandle RegisterSilentPointRemoved(void* cxt, SilentPointRemovedCB CB);
00112 
00118     void UnregisterPointSilenced(XnCallbackHandle hCB);
00124     void UnregisterPointRevived(XnCallbackHandle hCB);
00130     void UnregisterSilentPointRemoved(XnCallbackHandle hCB);
00131 
00138     void RemoveSilent(XnUInt64 nDelay, XnVSessionGenerator* pGenerator);
00145     void RemoveSilent(XnUInt64 nDelay, XnVPointTracker* pTracker);
00146 
00147 protected:
00148     XnBool InBoundingBox(const XnPoint3D& pt) const;
00149 
00150     XnBool IsSilent(XnUInt32 nID) const;
00151 
00152     void SilencePoint(XnUInt32 nID, XnFloat fTime);
00153     void RevivePoint(XnUInt32 nID);
00154     XnStatus CheckDelay(XnUInt32 nID, XnFloat fTime);
00155 
00156     void ChangeConstantArea(const XnBoundingBox3D& bbArea);
00157     void ChangeRelativeArea(const XnBoundingBox3D& bbArea);
00158 
00159     XnVMultipleHands m_FilteredHands;
00160     XnBoundingBox3D m_bbArea;
00161 
00162     XnBool m_bRelative;
00163     XnBoundingBox3D m_bbRelativeArea;
00164 
00165     XnVIntHash m_SilentPoints;
00166 
00167     XnVUintSpecificEvent m_PointSilencedCBs, m_PointRevivedCBs, m_SilentPointRemovedCBs;
00168 
00169     XnBool m_bRemoveByGenerator;
00170     XnBool m_bRemoveByTracker;
00171     XnVPointTracker* m_pRemovingTracker;
00172     XnVSessionGenerator* m_pRemovingGenerator;
00173     XnUInt64 m_nRemovalDelay;
00174 };
00175 
00176 
00177 #endif // _XNV_POINT_AREA_H_

Generated on Tue Jul 19 2011 20:22:59 for NITE 1.4.1 - API Reference by  doxygen 1.7.1