123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- //
- // particle.cpp
- // emptyExample
- //
- // Created by Sebastian Holzki on 16.04.19.
- //
- #pragma once
- #include "particle.hpp"
- #include "ofApp.h"
-
-
- 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, Attractor attractor){
-
-
-
-
-
- }
-
-
- // -----------------------------------
-
- 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
-
-
- */
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|