
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///		ZSprite Class
///
///		- Sprite Class
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






#ifndef __ZOOSPRITE_H__
#define __ZOOSPRITE_H__


#include	"..\Basic\ZooStd.h"
#include	"..\Scene Graph\ZooNodeGraph.h"
#include	"..\Datas\ZooMaterial.h"


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///		ZSprite Class
///
///		- Classe des collisions (sphére et OBB)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ZSprite : public ZNodeGraph
{
protected:

	ZMaterial	*material;							// Material of the face

public:

	float		halfW, halfH;

	ZUV			UV1[4];								// Texture coordinates of these vertices
	ZUV			UV2[4];								// Texture coordinates of these vertices

	bool		clampU1, clampV1;
	bool		clampU2, clampV2;

	ZVector3	vertColor1[4];						// Texture coordinates of these vertices
	ZVector3	vertColor2[4];						// Texture coordinates of these vertices


	bool		CameraOriented;

	float		rotationZ;
	
	//$BLG
	bool		blg_sprClickable;

	///////////////////////////////////////////////////////////////////////////
	/// Constructor															///
	///////////////////////////////////////////////////////////////////////////
	ZSprite(int s3d);
	~ZSprite();


	///////////////////////////////////////////////////////////////////////////
	/// Set the material of the face										///
	///////////////////////////////////////////////////////////////////////////
	void SetMaterial(ZMaterial *newMat);
	ZMaterial*	GetMaterial();
};


///////////////////////////////////////////////////////////////////////////
/// Get the material of the face										///
///////////////////////////////////////////////////////////////////////////
inline ZMaterial* ZSprite::GetMaterial()
{
	return material;
}


#endif