Quelcode des Partikelsystems Boden
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 912B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #pragma once
  2. #include "ofMain.h"
  3. #include "ofxXmlSettings.h"
  4. #include "attractor.h"
  5. enum particleMode{
  6. PARTICLE_MODE_DEFAULT,
  7. PARTICLE_MODE_ATTRACTOR,
  8. PARTICLE_MODE_RAIN,
  9. PARTICLE_MODE_RADIAL,
  10. PARTICLE_MODE_DETRACTOR,
  11. PARTICLE_MODE_POLY,
  12. PARTICLE_MODE_BRUNIG
  13. };
  14. class Particle{
  15. public:
  16. Particle();
  17. void setup(particleMode newMode);
  18. void update(float deltaT, vector<Attractor*>* attractors, vector<Particle*> system);
  19. void setMode(particleMode newMode);
  20. particleMode mode;
  21. void draw();
  22. void reset(ofVec2f _pos);
  23. float getX();
  24. float getY();
  25. void setVel(float min, float max);
  26. float getAgeNorm();
  27. float getMaxLife();
  28. ofxXmlSettings effect;
  29. int counterOfActiveAttractors;
  30. ofVec2f vel;
  31. ofVec2f pos;
  32. ofVec2f frc;
  33. float scale;
  34. float drag;
  35. float uniqueVal;
  36. float maxLife;
  37. float age;
  38. float size;
  39. float mass;
  40. int blobCounterInParticle;
  41. ofColor color;
  42. ofImage tex;
  43. };