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.hpp 859B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // particle.hpp
  3. // emptyExample
  4. //
  5. // Created by Sebastian Holzki on 16.04.19.
  6. //
  7. #pragma once
  8. #include <stdio.h>
  9. #include "ofMain.h"
  10. #include "attractor.hpp"
  11. class Particle {
  12. public:
  13. Particle();
  14. ~Particle();
  15. void setup(ofVec2f position);
  16. void update(float deltaT, Attractor attractor);
  17. void draw();
  18. float getMaxLife();
  19. float getAge();
  20. float getAgeNorm();
  21. void mapParticle();
  22. bool borderCollission();
  23. private:
  24. ofVec2f velocity;
  25. ofVec2f position;
  26. float maxLife;
  27. float age;
  28. float size;
  29. float mass;
  30. ofColor color;
  31. int stele;
  32. //on which "stele" is the particle? --> will affect the movement (mapping), when it reaches borders of its "stele" !
  33. //if border 1/2/3/4 (<,>,v,^), then map particle
  34. };