diff options
Diffstat (limited to 'morpher/src')
| -rw-r--r-- | morpher/src/main.cpp | 16 | ||||
| -rw-r--r-- | morpher/src/morphmesh.cpp | 26 | ||||
| -rw-r--r-- | morpher/src/morphmesh.h | 19 | ||||
| -rw-r--r-- | morpher/src/testApp.cpp | 71 | ||||
| -rw-r--r-- | morpher/src/testApp.h | 23 |
5 files changed, 155 insertions, 0 deletions
diff --git a/morpher/src/main.cpp b/morpher/src/main.cpp new file mode 100644 index 0000000..6a32c6a --- /dev/null +++ b/morpher/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context + + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp( new testApp()); + +} diff --git a/morpher/src/morphmesh.cpp b/morpher/src/morphmesh.cpp new file mode 100644 index 0000000..c8826f3 --- /dev/null +++ b/morpher/src/morphmesh.cpp @@ -0,0 +1,26 @@ +#include "morphmesh.h" + +morphmesh::morphmesh() +{ + //ctor +} + +morphmesh::~morphmesh() +{ + //dtor +} + +bool morphmesh::loadmesh(string filename){ + bool loaded=false; + ofxXmlSettings XML; + if( !XML.loadFile(filename) ){ + printf("unable to load %s check data/ folder\n",filename.c_str()); + }else{ + if(XML.pushTag("MeshList")) { + int verts=ofToInt(XML.getAttribute("mesh","VertexCount","none",0)); + int numMeshes=XML.getNumTags("Mesh"); + + } + } + return loaded; +}
\ No newline at end of file diff --git a/morpher/src/morphmesh.h b/morpher/src/morphmesh.h new file mode 100644 index 0000000..3f401c6 --- /dev/null +++ b/morpher/src/morphmesh.h @@ -0,0 +1,19 @@ +#ifndef MORPHMESH_H +#define MORPHMESH_H + +#include <ofMesh.h> +#include <ofxXmlSettings.h> + + +class morphmesh : public ofMesh +{ + public: + morphmesh(); + virtual ~morphmesh(); + bool loadmesh(string filename); + protected: + private: + vector < <vector <ofVec3f> >targets; +}; + +#endif // MORPHMESH_H diff --git a/morpher/src/testApp.cpp b/morpher/src/testApp.cpp new file mode 100644 index 0000000..aac34cc --- /dev/null +++ b/morpher/src/testApp.cpp @@ -0,0 +1,71 @@ +#include "testApp.h" + +#include "morphmesh.h" + +//-------------------------------------------------------------- +void testApp::setup(){ + +} + +//-------------------------------------------------------------- +void testApp::update(){ + + + +} + +//-------------------------------------------------------------- +void testApp::draw(){ + ofBackground(0,0,0); + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + + switch (key){ + case 'a': + break; + case 'z': + break; + } +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void testApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void testApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/morpher/src/testApp.h b/morpher/src/testApp.h new file mode 100644 index 0000000..58fb4ce --- /dev/null +++ b/morpher/src/testApp.h @@ -0,0 +1,23 @@ +#pragma once + +#include "ofMain.h" + +class testApp : public ofBaseApp{ + + public: + void setup(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + +}; + |
