#ifndef SHIP_EMITTOR_H
#define SHIP_EMITTOR_H

#include "./renderer/softProjRender.h"
#include "./math/Mathematics.h"
#include "particles\emittor.h"
#include "particles\particle.h"
#include "softProj\Render\SpaceStructures.h"
#include <cassert>

using namespace GEOMETRY;
using namespace ANALYTICAL_GEOMETRY;

/// Emittor interface for Ship engine
/**
* Emittor interface for Ship engine
*/
class ShipEmittorInterface : public BasicEmittor
{
public:
	virtual void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir )=0; ///Emits particles from given position in opposite direction.
	unsigned int texId; ///Particle texture id
};

//############################################################

/// Emittor for Ship type0 engine
/**
* Emittor for Ship type0 engine
*/
class ShipEmittorType0: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};

//############################################################

/// Emittor for Ship type1 engine
/**
* Emittor for Ship type1 engine
*/
class ShipEmittorType1: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};

//############################################################

/// Emittor for Ship type2 engine
/**
* Emittor for Ship type2 engine
*/
class ShipEmittorType2: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};

//#############################################################

/// Emittor for Ship type3 engine
/**
* Emittor for Ship type3 engine
*/
class ShipEmittorType3: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};

//#############################################################

/// Emittor for Ship type4 engine
/**
* Emittor for Ship type4 engine
*/
class ShipEmittorType4: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};


//#############################################################

/// Emittor for Ship type5 engine
/**
* Emittor for Ship type5 engine
*/
class ShipEmittorType5: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};


//#############################################################

/// Emittor for Mining machines
/**
* Emittor for Mining machines
*/
class MiningEmittor: public ShipEmittorInterface
{
private:
	void generateParticle( const Point_3<float> &pos, const Vector_3<float> &dir, GraphicParticle &dstParticle );

public:
	void emitParticles( const Point_3<float> &pos, const Vector_3<float> &dir  );
};

#endif