summaryrefslogtreecommitdiff
path: root/gaunt01/src/morphmesh.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-03-31 16:44:02 +0100
committerTim Redfern <tim@eclectronics.org>2012-03-31 16:44:02 +0100
commit0e8f0361c1068eb4c2f634dfcf4e1762d87f40d2 (patch)
tree96a4eb154c1ac2dbe5ad4e04d4e33b281832e441 /gaunt01/src/morphmesh.h
parent623e1924aeea83ea70c8ae7f645b067f17a293ea (diff)
implementing trap door
Diffstat (limited to 'gaunt01/src/morphmesh.h')
-rw-r--r--gaunt01/src/morphmesh.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/gaunt01/src/morphmesh.h b/gaunt01/src/morphmesh.h
new file mode 100644
index 0000000..91a8f17
--- /dev/null
+++ b/gaunt01/src/morphmesh.h
@@ -0,0 +1,42 @@
+#ifndef MORPHMESH_H
+#define MORPHMESH_H
+
+#include <iostream>
+#include <iterator>
+
+#include <ofMesh.h>
+#include <ofxXmlSettings.h>
+
+/*
+Tim Redfern, March 2012
+
+Loads meshes in Oak3D XML format
+
+Draws blended morph targets
+
+Multiple meshes are loaded as morph targets
+
+Coords are absolute
+
+*/
+
+
+class morphmesh : public ofMesh
+{
+ public:
+ morphmesh();
+ morphmesh(string filename);
+ virtual ~morphmesh();
+ bool loadfile(string filename);
+ bool isLoaded();
+ void draw();
+ void draw(int target);
+ void draw(const vector<int>& targets, const vector<float>& weights);
+ int getNumTargets();
+ protected:
+ private:
+ vector< vector<ofVec3f> > morphs;
+ bool loaded;
+};
+
+#endif // MORPHMESH_H