From adc1fe0182495151eba174f7ab5b99a900e10b5e Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 6 Apr 2012 00:00:16 +0100 Subject: changed morphmesh to use associative keys for targets --- morpher/src/morphmesh.h | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'morpher/src/morphmesh.h') diff --git a/morpher/src/morphmesh.h b/morpher/src/morphmesh.h index 7e3cb0b..ca1231c 100644 --- a/morpher/src/morphmesh.h +++ b/morpher/src/morphmesh.h @@ -18,26 +18,50 @@ Multiple meshes are loaded as morph targets Coords are absolute -TODO -draw(vector targets, vector weights); - m + +--managing movement sequences +--cycles can refer to targets by name +--high level controller objects can refer to animation sequences by name +--this makes it impossible for a re-odering to banjax everything + +cycles have a start time, and they either loop or act as a transition + +Working out the morphs is a question of: +-working out which cycles are active based on behaviours +-adding their morph targets into the current vector of targets + +behaviours are triggered by things like spotting people or avoiding the wall. +These could be parameterised on top of the rest? */ +class sequence +{ + //stores a morph sequence: an animation cycle or transition + public: + sequence(); + virtual ~sequence(); + + +}; + class morphmesh : public ofMesh { public: morphmesh(); morphmesh(string filename); virtual ~morphmesh(); - bool loadfile(string filename); + bool loadMesh(string filename); + bool isLoaded(); + void draw(); void draw(int target); - void draw(const vector& targets, const vector& weights); + void draw(const vector& targets, const vector& weights); int getNumTargets(); protected: private: - //vector < >targets; - vector< vector > morphs; + map< string,vector > morphs; + bool loaded; }; #endif // MORPHMESH_H -- cgit v1.2.3