summaryrefslogtreecommitdiff
path: root/gaunt01/src/morphmesh.h
diff options
context:
space:
mode:
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