diff KinectTrack.cc @ 2:3b5465899da9

add KinectTrack.cc
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Tue, 01 Feb 2011 03:01:22 +0900
parents
children 7e112b536f0a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/KinectTrack.cc	Tue Feb 01 03:01:22 2011 +0900
@@ -0,0 +1,25 @@
+#include <XnVNite.h>
+
+#include "KinectTrack.h"
+
+XnVPointDrawer::XnVPointDrawer(XnUInt32 nHistory, xn::DepthGenerator depthGenerator) :
+	XnVPointControl("XnVPointDrawer"),
+	mNHistorySize(nHistory), mDepthGenerator(depthGenerator), mBDrawDM(false), mBFrameID(false) {
+	mPFPositionBuffer = new XnFloat[nHistory*3];
+}
+
+XnVPointDrawer::~XnVPointDrawer() {
+	std::map<XnUInt32, std::list<XnPoint3D> >::iterator iter;
+	for (iter = mHistory.begin(); iter != mHistory.end(); ++iter)
+	{
+		iter->second.clear();
+	}
+	mHistory.clear();
+
+	delete []mPFPositionBuffer;
+}
+
+void XnVPointDrawer::setDepthMap(XnBool bDrawDM) {
+	mBDrawDM = bDrawDM;
+}
+