diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-04-16 18:35:55 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-04-16 18:35:55 +0100 |
| commit | 3411448d999ce36b5fcb14ca4829435308cbd70a (patch) | |
| tree | d102c6c3cea107f365328343c7b8d2258e3bf527 /gaunt01/src/player.cpp | |
| parent | 5c0480c311760f800ccdff4868e8fe0746d8f2b5 (diff) | |
player class
Diffstat (limited to 'gaunt01/src/player.cpp')
| -rw-r--r-- | gaunt01/src/player.cpp | 32 |
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 |
