123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #pragma once
-
- #include "ofMain.h"
- #include "ofxXmlSettings.h"
- #include "attractor.h"
-
- enum particleMode{
- PARTICLE_MODE_DEFAULT,
- PARTICLE_MODE_ATTRACTOR,
- PARTICLE_MODE_RAIN,
- PARTICLE_MODE_RADIAL,
- PARTICLE_MODE_DETRACTOR,
- PARTICLE_MODE_POLY,
- PARTICLE_MODE_BRUNIG
- };
-
- class Particle{
-
- public:
-
- Particle();
-
- void setup(particleMode newMode);
-
- void update(float deltaT, vector<Attractor*>* attractors, vector<Particle*> system);
- void setMode(particleMode newMode);
- particleMode mode;
-
- void draw();
- void reset(ofVec2f _pos);
-
- float getX();
- float getY();
-
- void setVel(float min, float max);
-
- float getAgeNorm();
- float getMaxLife();
-
-
- ofxXmlSettings effect;
-
- int counterOfActiveAttractors;
-
- ofVec2f vel;
- ofVec2f pos;
- ofVec2f frc;
-
- float scale;
- float drag;
- float uniqueVal;
-
- float maxLife;
- float age;
-
- float size;
- float mass;
-
- int blobCounterInParticle;
-
- ofColor color;
- ofImage tex;
- };
|