//********************************************************************
// Ninfa3D Engine 
// copyright 2008-2009
// By Viz_Fuerte
// VC: 9.0
// Mesh Emitter
//********************************************************************

/*--------------------------------------------------------------------
Includos*/

	#include "..\..\..\..\Header Files\Ninfa3D.h"

/*--------------------------------------------------------------------
Declaracion global de funciones*/

extern "C"
{

	/*================================================================
	Crea un emisor de particulas de tipo malla*/

	DLL_EXPORT void* DLL_APIENTRY CreateMeshEmitter(IParticleSystemSceneNode* Particles,unsigned int Min,unsigned int Max)
	{
		IParticleAnimatedMeshSceneNodeEmitter* Emitter = Particles->createAnimatedMeshSceneNodeEmitter(0,true,vector3df(0),0,-1,false,0,0,SColor(0),SColor(0),Min,Max,0,dimension2df(0,0),dimension2df(0,0));
		Particles->setEmitter(Emitter);
		return (void*)Emitter;
	}

	/*================================================================
	Establece la malla para el emisor*/

	DLL_EXPORT void DLL_APIENTRY MeshEmitterMesh(IParticleAnimatedMeshSceneNodeEmitter* Emitter,IAnimatedMeshSceneNode* Mesh)
	{
		Emitter->setAnimatedMeshSceneNode(Mesh);
	}

	/*================================================================
	Establece si todos los vertices emitiran particulas*/

	DLL_EXPORT void DLL_APIENTRY MeshEmitterEveryVertex(IParticleAnimatedMeshSceneNodeEmitter* Emitter,bool EveryMeshVertex)
	{
		Emitter->setEveryMeshVertex(EveryMeshVertex);
	}

}