123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef particle_h
- #define particle_h
- #pragma once
-
- #include "ofMain.h"
- #include "ofxCv.h"
- #include "ofxXmlSettings.h"
- #include "ofxOpenCv.h"
- #include <stdio.h>
-
-
- enum particleMode {
-
- };
-
- class Particle {
-
- public:
-
- Particle();
- ~Particle();
-
- void update(float deltaT);
- void draw();
- void mapParticle();
- void setup(ofVec2f pos, float maxAge);
- void updateParticle(double deltaT, ofVec2f attractor, bool cloudAttractorIsSet, bool imageIsOnTop, bool tornadoIsFinished, int imageHeight, int imageWidth, float sceneSizeX, float sceneSizeY);
- void doMovementOfParticlesAtRain(bool tornadoIsFinished, double deltaT, float sceneSizeX);
- void doMovementOfParticlesAtSymbols(double deltaT, ofVec2f &attractor);
- void doMovementOfParticlesAtRocketEffect(float sceneSizeY, int imageHeight, int imageWidth, float sceneSizeX, ofVec2f &attractor, double deltaT);
- void doMovementOfHexagonOnTheTop(ofVec2f &attractor, float sceneSizeX, double deltaT);
- void setMode(particleMode newMode);
-
- float getMaxLife();
- float getAge();
- float getAgeNorm();
- bool borderCollission();
-
- ofVec2f vel;
- ofVec2f velocity2;
- ofVec2f force;
-
- particleMode mode;
-
- float deleteAfterLeavingSceneY();
- bool deleteAfterLeavingSceneX();
- bool pL;
- bool particleLeftScene;
-
- int valueToMoveToTop;
- int valueToMoveToRight;
- int ticksToMoveParticlesToRight;
- int counterToMoveParticlesToRight;
-
-
-
-
-
-
- private:
-
- ofVec2f velocity;
- ofVec2f position;
-
- float maxLife;
- float age;
- float size;
- float mass;
-
- ofColor color;
-
-
- int stele;
- //on which "stele" is the particle? --> will affect the movement (mapping), when it reaches borders of its "stele" !
- //if border 1/2/3/4 (<,>,v,^), then map particle
-
- };
- #endif
|