64 lines
912 B
C
Raw Normal View History

2019-05-09 12:38:07 +00:00
#pragma once
#include "ofMain.h"
#include "ofxXmlSettings.h"
#include "attractor.h"
enum particleMode{
PARTICLE_MODE_DEFAULT,
PARTICLE_MODE_ATTRACTOR,
PARTICLE_MODE_RAIN,
PARTICLE_MODE_RADIAL,
PARTICLE_MODE_DETRACTOR,
PARTICLE_MODE_POLY,
PARTICLE_MODE_BRUNIG
};
class Particle{
public:
Particle();
void setup(particleMode newMode);
void update(float deltaT, vector<Attractor*>* attractors, vector<Particle*> system);
void setMode(particleMode newMode);
particleMode mode;
void draw();
void reset(ofVec2f _pos);
float getX();
float getY();
void setVel(float min, float max);
float getAgeNorm();
float getMaxLife();
ofxXmlSettings effect;
int counterOfActiveAttractors;
ofVec2f vel;
ofVec2f pos;
ofVec2f frc;
float scale;
float drag;
float uniqueVal;
float maxLife;
float age;
float size;
float mass;
int blobCounterInParticle;
ofColor color;
ofImage tex;
};