// // particle.cpp // emptyExample // // Created by Sebastian Holzki on 16.04.19. // #include "particle.hpp" Particle::Particle() { } // ----------------------------------- Particle::~Particle() { } // ----------------------------------- void Particle::setup(ofVec2f _position){ this->position = _position; velocity.set(0,0); age = 0.0; maxLife = 12.0; color.set(250,250,250); size = 2.0; mass = 100; } // ----------------------------------- void Particle::update(float deltaT){ } // ----------------------------------- void Particle::draw(){ ofDrawCircle(position,size); } //----------------------------------- float Particle::getMaxLife(){ return maxLife; } //----------------------------------- float Particle::getAge(){ return age; } //----------------------------------- void Particle::mapParticle(){ /* Put an if Statement before it: if(borderCollission == true){mapParticle()} The particle will be mapped to a new position, using information about: - old position - velocity (direction) - defined borders in the projection --> globals like window size, angle between "stelen", width of stelen, etc. if the particle hits a border */ }