summaryrefslogtreecommitdiff
path: root/morpher/src/morphmesh.h
blob: 7e3cb0b8ef3a283148eefd271ae926cc4ab1f491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#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

TODO
draw(vector<int> targets, vector<float> weights); - m

*/


class morphmesh : public ofMesh
{
    public:
        morphmesh();
	morphmesh(string filename);
        virtual ~morphmesh();
	bool loadfile(string filename);
	void draw(int target);
	void draw(const vector<int>& targets, const vector<float>& weights);
    int getNumTargets();
    protected:
    private:
    //vector < <vector <ofVec3f> >targets;
    vector< vector<ofVec3f> > morphs;
};

#endif // MORPHMESH_H