/*****************************************************************************
 * $Id: game_pony_cloud.hh,v 1.12 2006/08/10 03:18:58 devel Exp $
 * @file
 * @author	Jim E. Brooks  http://www.jimbrooks.org
 * @brief	Cloud class.
 *//*
 * LEGAL:	COPYRIGHT (C) 2006 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE (GPL).
 *****************************************************************************/

#if COMPILING_GAME_PONY
#ifndef GAME_PONY_CLOUD_HH
#define GAME_PONY_CLOUD_HH 1

////////////////////////////////////////////////////////////////////////////////
/// @brief PerlinCloud class.
class PerlinCloud : public FixedMesh
{
private:
	PREVENT_COPYING(PerlinCloud)
	typedef FixedMesh Parent;

public:
	explicit			PerlinCloud( QuadrantPtrc q, const Position& pos );
						~PerlinCloud();
	void				FinalConstruction( void ) { }
	bool				Reproducible( void ) { return true; }
	void				Draw( void );
	const string		GetName( void ) { return string("PerlinCloud"); }
	uint				GetVertexCnt( void ) { return ELEMS(mWorldVertexs); }
	const WorldVertex*	GetWorldVertexs( void );
	Position			GetPosition( void ) { return mPos; }
	void				SetPosition( const Position& pos ) { mPos = pos; }

	void SetVertexCnt( uint vcnt ) { }				// OBJECT NOP
	void SetWorldVertexs( WorldVertex* wv ) { }		// OBJECT NOP
	uint GetPolygonCnt( void ) { return 0; }		// OBJECT NOP
	
private:
	void			Generate( void );
	fp				CloudNoise( const Vector3& vec );

	Matrix			m;
	Position		mPos;
	LocalVertex		mLocalVertexs[4];
	WorldVertex		mWorldVertexs[4];
	enum			{ TEX_WIDTH = 128, TEX_HEIGHT = 128 };
	static MutableTexture* msTexture;
	static bool msGenerated;
};

#endif // GAME_PONY_CLOUD_HH
#endif // COMPILING_GAME_PONY
