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.

objectPhysics.hpp 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. //
  2. // objectPhysics.hpp
  3. // emptyExample
  4. //
  5. // Created by Sebastian Holzki on 01.05.19.
  6. //
  7. #pragma once
  8. #include <stdio.h>
  9. #include "ofMain.h"
  10. class ObjectPhysics {
  11. public:
  12. ObjectPhysics();
  13. ~ObjectPhysics();
  14. void update(float deltaT);
  15. void setPosition(float x, float y);
  16. void setPosition(ofVec2f position);
  17. ofVec2f getPosition();
  18. void setEmitting(bool emitting);
  19. void setAttracting(bool attracting);
  20. void setIsVisitor(bool isVisitor);
  21. bool getIsVisitorObject();
  22. bool isAVisitorObject;
  23. void aging(float deltaT);
  24. string type;
  25. ofVec2f position;
  26. bool emitting; //if true: Particles will emit from the position
  27. bool attracting; //if true: Particles will be attracted to the position
  28. bool repell; //if true: Particles will be repelled from the position
  29. bool agingEnabled;
  30. float getAge();
  31. float age;
  32. protected:
  33. float force;
  34. float vel;
  35. };
  36. // ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR *******
  37. class Attraktor: public ObjectPhysics {
  38. public:
  39. Attraktor();
  40. Attraktor(float x, float y);
  41. Attraktor(ofVec2f position);
  42. ~Attraktor();
  43. private:
  44. };
  45. // ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER *******
  46. class Emitter: public ObjectPhysics {
  47. public:
  48. Emitter();
  49. Emitter(float x, float y);
  50. Emitter(ofVec2f position);
  51. ~Emitter();
  52. private:
  53. };
  54. // *** EMITTER ON STELE *** EMITTER ON STELE *** EMITTER ON STELE ***
  55. class EmitterOnStele: public ObjectPhysics {
  56. public:
  57. EmitterOnStele();
  58. EmitterOnStele(float x, float y, bool aging);
  59. EmitterOnStele(ofVec2f position, bool aging);
  60. ~EmitterOnStele();
  61. private:
  62. };
  63. // ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN *******
  64. class AttraktorOnStele: public ObjectPhysics {
  65. public:
  66. AttraktorOnStele();
  67. AttraktorOnStele(float x, float y);
  68. AttraktorOnStele(ofVec2f position);
  69. ~AttraktorOnStele();
  70. private:
  71. };