Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of scoreLight_Advanced by
blobConfig.h
- Committer:
- mbedalvaro
- Date:
- 2012-04-12
- Revision:
- 11:62f7183a03e7
- Parent:
- 5:73cd58b58f95
- Child:
- 15:56a0bf424e8d
File content as of revision 11:62f7183a03e7:
#ifndef blobConf_h
#define blobConf_h
// include all kind of spots classes (childs of soundSpot)
#include "elasticLoop.h"
#include "rigidLoop.h"
#include <vector>
//#include <deque>; // using a deque instead of a vector can have advantanges in terms of memory (deque can handle fragmented memory), BUT IS SLOWER.
using namespace std;
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
