/*
	ZParticleSpawnStrategy.h
	Author: James Russell <jcrussell@762studios.com>

	Purpose: TODO

	Changelog
	2011/08/28 - creation (jcrussell)
*/

#pragma once

#ifndef _ZPARTICLESPAWNSTRATEGY_H
#define _ZPARTICLESPAWNSTRATEGY_H

#include <ZUtil/ZUtil.hpp>

//Forward Declarations
class ZParticleEffect;
class ZParticleEmitter;
class ZParticleStorageAllocator;

class ZParticleSpawnStrategy
{
public:
	//Virtual Destructor
	~ZParticleSpawnStrategy() { }

	/*
	virtual public ZParticleSpawnStrategy::CheckParticleFormat
	
	Checks to see if this spawn strategy can spawn the provided particle format.
	
	@param _format - string description of the particle format
	@return (bool) - true if this spawn strategy can handle it, false otherwise
	@context (all)
	*/
	virtual bool CheckParticleFormat(const ZString& _format) = 0;

	/*
	virtual public ZParticleSpawnStrategy::UpdateSpawn
	
	An update call to the spawn strategy that determines if more particles should be created.  If so, the new particle data
	can be placed directly into particle storage.
	
	@param _particleEffect - the emitter's parent particle effect
	@param _particleEmitter - the parent emitter
	@param _storageAllocator - particle storage used by this particle effect
	@param _dt - the time (in milliseconds) since last update
	@return (void)
	@context (all)
	*/
	virtual void UpdateSpawn(ZParticleEffect* _particleEffect, 
							 ZParticleEmitter* _particleEmitter, 
							 ZParticleStorageAllocator* _storageAllocator, 
							 size_t _dt
							 ) = 0;
};

#endif
 
