Projektordner für das Team Deutsches Museum (FORUM).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

particle.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef particle_h
  2. #define particle_h
  3. #pragma once
  4. #include "ofMain.h"
  5. #include "ofxCv.h"
  6. #include "ofxXmlSettings.h"
  7. #include "ofxOpenCv.h"
  8. #include <stdio.h>
  9. enum particleMode {
  10. };
  11. class Particle {
  12. public:
  13. Particle();
  14. ~Particle();
  15. void update(float deltaT);
  16. void draw();
  17. void mapParticle();
  18. void setup(ofVec2f pos, float maxAge);
  19. void updateParticle(double deltaT, ofVec2f attractor, bool cloudAttractorIsSet, bool imageIsOnTop, bool tornadoIsFinished, int imageHeight, int imageWidth, float sceneSizeX, float sceneSizeY);
  20. void doMovementOfParticlesAtRain(bool tornadoIsFinished, double deltaT, float sceneSizeX);
  21. void doMovementOfParticlesAtSymbols(double deltaT, ofVec2f &attractor);
  22. void doMovementOfParticlesAtRocketEffect(float sceneSizeY, int imageHeight, int imageWidth, float sceneSizeX, ofVec2f &attractor, double deltaT);
  23. void doMovementOfHexagonOnTheTop(ofVec2f &attractor, float sceneSizeX, double deltaT);
  24. void setMode(particleMode newMode);
  25. float getMaxLife();
  26. float getAge();
  27. float getAgeNorm();
  28. bool borderCollission();
  29. ofVec2f vel;
  30. ofVec2f velocity2;
  31. ofVec2f force;
  32. particleMode mode;
  33. float deleteAfterLeavingSceneY();
  34. bool deleteAfterLeavingSceneX();
  35. bool pL;
  36. bool particleLeftScene;
  37. int valueToMoveToTop;
  38. int valueToMoveToRight;
  39. int ticksToMoveParticlesToRight;
  40. int counterToMoveParticlesToRight;
  41. private:
  42. ofVec2f velocity;
  43. ofVec2f position;
  44. float maxLife;
  45. float age;
  46. float size;
  47. float mass;
  48. ofColor color;
  49. int stele;
  50. //on which "stele" is the particle? --> will affect the movement (mapping), when it reaches borders of its "stele" !
  51. //if border 1/2/3/4 (<,>,v,^), then map particle
  52. };
  53. #endif