1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- //
- // particle.hpp
- // emptyExample
- //
- // Created by Sebastian Holzki on 16.04.19.
- //
-
- #pragma once
-
- #include <stdio.h>
- #include "ofMain.h"
- #include "attractor.hpp"
-
-
-
-
- class Particle {
-
- public:
-
- Particle();
- ~Particle();
-
- void setup(ofVec2f position);
- void update(float deltaT, Attractor attractor);
- void draw();
-
- float getMaxLife();
- float getAge();
- float getAgeNorm();
-
-
- void mapParticle();
- bool borderCollission();
-
-
-
-
- private:
-
- ofVec2f velocity;
- ofVec2f position;
-
- float maxLife;
- float age;
- float size;
- float mass;
-
- ofColor color;
-
-
- int stele;
- //on which "stele" is the particle? --> will affect the movement (mapping), when it reaches borders of its "stele" !
- //if border 1/2/3/4 (<,>,v,^), then map particle
-
- };
|