|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "ofMain.h" |
|
|
#include "ofMain.h" |
|
|
#include "attractor.h" |
|
|
#include "attractor.h" |
|
|
|
|
|
#include "line.h" |
|
|
|
|
|
|
|
|
class thParticle |
|
|
|
|
|
|
|
|
class Particle |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
|
|
|
|
|
|
|
thParticle(); |
|
|
|
|
|
~thParticle(); |
|
|
|
|
|
|
|
|
Particle(); |
|
|
|
|
|
~Particle(); |
|
|
|
|
|
|
|
|
void setup(ofVec2f position); |
|
|
void setup(ofVec2f position); |
|
|
|
|
|
|
|
|
void update(float deltaT, vector<Attractor*>* attractors); |
|
|
void update(float deltaT, vector<Attractor*>* attractors); |
|
|
// void update(float deltaT, ofVec2f attractor); |
|
|
|
|
|
//Partikel wird komplett upgedated (Bewegung, Farbe, etc...) |
|
|
|
|
|
//deltaT Zeitintervall seit letztem Update |
|
|
|
|
|
void draw(); //Partikel anzeigen |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void draw(); |
|
|
|
|
|
|
|
|
float getAgeNorm(); |
|
|
float getAgeNorm(); |
|
|
float getMaxLife(); |
|
|
float getMaxLife(); |
|
|
ofImage tex; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int blobCounterInParticle; |
|
|
int blobCounterInParticle; |
|
|
|
|
|
|
|
|
ofColor color; |
|
|
ofColor color; |
|
|
|
|
|
|
|
|
|
|
|
ofImage tex; |
|
|
}; |
|
|
}; |