2
|
1 #include <XnVNite.h>
|
|
2
|
|
3 #include "KinectTrack.h"
|
|
4
|
|
5 XnVPointDrawer::XnVPointDrawer(XnUInt32 nHistory, xn::DepthGenerator depthGenerator) :
|
|
6 XnVPointControl("XnVPointDrawer"),
|
|
7 mNHistorySize(nHistory), mDepthGenerator(depthGenerator), mBDrawDM(false), mBFrameID(false) {
|
|
8 mPFPositionBuffer = new XnFloat[nHistory*3];
|
|
9 }
|
|
10
|
|
11 XnVPointDrawer::~XnVPointDrawer() {
|
|
12 std::map<XnUInt32, std::list<XnPoint3D> >::iterator iter;
|
|
13 for (iter = mHistory.begin(); iter != mHistory.end(); ++iter)
|
|
14 {
|
|
15 iter->second.clear();
|
|
16 }
|
|
17 mHistory.clear();
|
|
18
|
|
19 delete []mPFPositionBuffer;
|
|
20 }
|
|
21
|
|
22 void XnVPointDrawer::setDepthMap(XnBool bDrawDM) {
|
|
23 mBDrawDM = bDrawDM;
|
|
24 }
|
|
25
|