123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- //
- // objectPhysics.hpp
- // emptyExample
- //
- // Created by Sebastian Holzki on 01.05.19.
- //
- #pragma once
-
-
- #include <stdio.h>
- #include "ofMain.h"
-
-
-
-
-
- class ObjectPhysics {
-
- public:
-
- ObjectPhysics();
- ~ObjectPhysics();
-
- void update(float deltaT);
-
- void setPosition(float x, float y);
- void setPosition(ofVec2f position);
- ofVec2f getPosition();
-
- void setEmitting(bool emitting);
- void setAttracting(bool attracting);
-
- void setIsVisitor(bool isVisitor);
- bool getIsVisitorObject();
- bool isAVisitorObject;
-
- void aging(float deltaT);
-
- string type;
-
- ofVec2f position;
- bool emitting; //if true: Particles will emit from the position
- bool attracting; //if true: Particles will be attracted to the position
- bool repell; //if true: Particles will be repelled from the position
- bool agingEnabled;
-
-
- float getAge();
- float age;
-
-
- protected:
-
- float force;
- float vel;
-
-
-
-
-
- };
-
- // ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR ******* ATTRAKTOR *******
-
- class Attraktor: public ObjectPhysics {
-
-
- public:
-
- Attraktor();
- Attraktor(float x, float y);
- Attraktor(ofVec2f position);
-
- ~Attraktor();
-
-
-
-
- private:
-
-
- };
-
- // ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER ******* EMITTER *******
-
- class Emitter: public ObjectPhysics {
-
-
- public:
-
-
- Emitter();
- Emitter(float x, float y);
- Emitter(ofVec2f position);
- ~Emitter();
-
- private:
-
- };
-
- // *** EMITTER ON STELE *** EMITTER ON STELE *** EMITTER ON STELE ***
-
-
- class EmitterOnStele: public ObjectPhysics {
-
-
- public:
-
- EmitterOnStele();
- EmitterOnStele(float x, float y, bool aging);
- EmitterOnStele(ofVec2f position, bool aging);
- ~EmitterOnStele();
-
- private:
-
- };
-
-
- // ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN ******* ATTRAKTOR STELEN *******
-
- class AttraktorOnStele: public ObjectPhysics {
-
-
- public:
-
- AttraktorOnStele();
- AttraktorOnStele(float x, float y);
- AttraktorOnStele(ofVec2f position);
-
- ~AttraktorOnStele();
-
-
-
-
- private:
-
-
- };
|