summaryrefslogtreecommitdiff
path: root/gaunt01/src/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gaunt01/src/player.cpp')
-rw-r--r--gaunt01/src/player.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/gaunt01/src/player.cpp b/gaunt01/src/player.cpp
new file mode 100644
index 0000000..39c91ac
--- /dev/null
+++ b/gaunt01/src/player.cpp
@@ -0,0 +1,32 @@
+#include "player.h"
+
+player::player()
+{
+ //ctor
+}
+
+player::~player()
+{
+ //dtor
+}
+
+void player::setPosition(ofVec3f _pos) {
+ position.set(_pos);
+}
+
+ofVec3f player::getPosition() {
+ return position;
+}
+
+void player::update(ofxCvBlob blob) {
+ outline=ofPolyline(blob.pts);
+ tessellateToMesh(outline,OF_POLY_WINDING_NONZERO,billboard,true);
+ for (int i=0;i<billboard.getNumVertices();i++) {
+ ofVec3f v=billboard.getVertex(i);
+ billboard.addTexCoord(ofVec2f(v.x,v.y));
+ }
+}
+
+void player::draw(){
+ billboard.draw();
+} \ No newline at end of file