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.

imageParticleSystem.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef imageParticleSystem_h
  2. #define imageParticleSystem_h
  3. #pragma once
  4. #include "ofMain.h"
  5. #include "ofxCv.h"
  6. #include "ofxOpenCv.h"
  7. #include "particle.h"
  8. #include "drawableImage.h"
  9. #include <stdio.h>
  10. class ImageParticleSystem
  11. {
  12. public:
  13. ImageParticleSystem(int sceneSizeX, int sceneSizeY, ofImage fileImageHex, string imageName);
  14. ~ImageParticleSystem();
  15. vector<ofVec2f>attractors;
  16. vector<Particle*> particles;
  17. ofImage fileImageHex;
  18. ofImage fileImageCloud;
  19. int sceneSizeX;
  20. int sceneSizeY;
  21. int imageHeight;
  22. int imageWidth;
  23. int maxParticle;
  24. int picPix;
  25. int k;
  26. int ticksToMoveImageToTop;
  27. int counterToMoveImageToTop;
  28. int status;
  29. bool tornadoStarted;
  30. bool editingWarp;
  31. bool imageReachedTopAndAttractorIsChanged;
  32. float birthCnt;
  33. float maxLife;
  34. float parAmount;
  35. float height;
  36. double time;
  37. double tornadoStartTime;
  38. void updateParticleSystem();
  39. void deleteParticlesForRocketEffect();
  40. void deleteParticlesForHexagon();
  41. void createParticlesForHexagonInSymbol();
  42. void createParticlesForHexagonInCloud();
  43. void deleteParticleAfterLeavingOntheRightAndCreateThemOnTheLeft(int p);
  44. void drawImageParticleSystem();
  45. void setSymbolAttractorIsSet(bool value);
  46. void setCloudAttractorIsSet(bool value);
  47. void changeAttractorImage(ofImage newAttractorImage);
  48. private:
  49. DrawableImage* imageToDraw;
  50. vector<ofVec2f> pixelInVector(ofImage a);
  51. void setAttractorsFromHexagonFromPicture();
  52. bool symbolAttractorIsSet;
  53. bool cloudAttractorIsSet;
  54. };
  55. #endif
  56. #pragma once