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.

particleSystem.hpp 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // particleSystem.hpp
  3. // emptyExample
  4. //
  5. // Created by Sebastian Holzki on 16.04.19.
  6. //
  7. #pragma once
  8. #include <stdio.h>
  9. #include "ofxXmlSettings.h"
  10. #include "particle.hpp"
  11. #include "objectPhysics.hpp"
  12. #include "checkedInVisitor.hpp"
  13. //class Line will be used to draw the polymesh
  14. class Line {
  15. public:
  16. Line();
  17. Line(ofPoint p1, ofPoint p2){
  18. point1 = p1;
  19. point2= p2;
  20. };
  21. ~Line();
  22. ofPoint point1;
  23. ofPoint point2;
  24. };
  25. class ParticleSystem {
  26. public:
  27. ParticleSystem();
  28. ~ParticleSystem();
  29. void setup();
  30. void update(float deltaT, particleMode mode, vector<ObjectPhysics*>* objectPhysics, vector<CheckedInVisitor*>* checkedInVisitors, float sceneWidth, float sceneHeight);
  31. void draw(typeOfView activeTypeOfView);
  32. void updateLines(particleMode currentMode, vector<ObjectPhysics*>* objectPhysics);
  33. particleMode currentMode;
  34. ofxXmlSettings xmlParticleSystems;
  35. ofxXmlSettings xmlParticles; // ??? wo soll das hin ???
  36. vector<Particle*> particles;
  37. vector<Line*> lines;
  38. private:
  39. int playerType;
  40. //Global for particleSystems-birthrate -> can be used to emit faster/slower
  41. int PARTICLESYSTEM_BIRTHRATE;
  42. int PRODUCED_PER_EMITTER;
  43. };