#ifndef PARTICLE_H
#define PARTICLE_H

#include "Cpart_emitter.h"
//#include <math.h>
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "./utils/vector3.h"



class Cpart_emitter;

class Cparticle
{
public:
	Cparticle (void);
	Cparticle (Cpart_emitter* emitter);
	void update ();
	void render ();

//	void set_part_emitter (Cpart_emitter* emitter);

	Vector3 m_pos;
	Vector3 m_vel;
	float m_color[4];	//or material
	float m_size;

	float m_fade_vel;

	int m_current_time;

	int m_time_to_life;

	bool is_dead;
	bool fade_in;
	bool fade_out;

	void set_particle (Vector3 pos, Vector3 vel, float color[4], float size, int time_to_life, float fade_vel);

protected:
	Cpart_emitter* m_emitter;

public:
	~Cparticle(void);
};

#endif // PARTICLE_H
