just a test

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

blobConfig.h

Committer:
mbedalvaro
Date:
2012-04-05
Revision:
5:73cd58b58f95
Parent:
1:a4050fee11f7
Child:
11:62f7183a03e7

File content as of revision 5:73cd58b58f95:

#ifndef blobConf_h
#define blobConf_h

// include all kind of spots classes (childs of soundSpot)
#include "elasticLoop.h"  
#include "rigidLoop.h"

class blobConfig {
  public:
  
  //========== Methods ============= 
   blobConfig(); // overaloded constructor
   ~blobConfig();
   
   void clearConfig(); // actually delete every element of the config (note: the blobArray is a vector of POINTERS, it is not enought to do blobArray.clear()). 
   
   void allKill(); // this put all the blobs in "dead" mode, meaning that neither rendering nor update is done (but they are not deleted). 
   void allAlive();
   
   void allStandBy(); //NO update, but rendering may be done (they are "frozen" in their positions)
   void allResume();
   
   void allInvisible(); // blobs are invisible, but they may continue to evolve (call to update)
   void allVisible(); 
   
   void update(); // update dynamics
   void draw();   // draw in the LaserSensingTrajectory object (lsdTrajectory) of each blob, using the openGL laser rendering (not yet done). 
   
   void sendConfData(); // send OSC data for all the blobs
   
   // ========= Standard configurations: =====================
   void computeBoundingBox();
   
   void addOneElasticLoopRelax();
   void addOneElasticLoopContract();
   void addOneElasticLoopContractCentral();
   void addOneElasticContourFollowing();
   void addOneElasticContourFollowingFAST();
   void addOneElasticBouncing();
   
   void addOneRigidLoopBouncing();
   void addOneRigidLoopFollowing();
   void addOneRigidLoopTest();
   
   //========== Variables =============
   // I use an array (actually a vector) of POINTERS of polymorphic class soundSpot with virtual methods (this way we can access polymorphic methods - of children - with a pointer)
   // BUT ATTENTION when clearing the vector: instantiated objects must be DELETED before. 
   vector<soundSpot*> blobArray;
   int numBlobs;// this is just equal to blobArray.size()
};


#endif