www.pudn.com > sxdl.zip > blob.h


#if !defined Blob_Included  
#define Blob_Included 
 
#include "sxdl.h" 
 
class CBlob ;  
 
class CBlobableEntity : 
	public CEntity  
{ 
	friend class CBlob ;  
public :  
	CBlobableEntity ( int ColorStyle ) ;  
	virtual ~CBlobableEntity  ( void ) { } ; 
 
private :  
	float RedDiffuse  ; 
	float GrnDiffuse  ; 
	float BluDiffuse  ; 
	float RedFade  ; 
	float GrnFade  ; 
	float BluFade  ; 
} ;  
 
 
class CBlob : 
	public CCustomRenderer 
{ 
public: 
	CBlob ( int Rings , int Segments , int TextureId , int VertexShaderId ) ; 
	virtual ~CBlob ( void ) ; 
 
private :  
	inline const int BlobVBSize ( int Rings , int Segments ) { return ( Rings - 1 ) * Segments + 2 ; } ;  
	int Rings ;  
	int Segments ;  
	int Vertices ; // = ( Rings + 1 ) * ( Segments + 1 ) ; 
	int ColorStyle ;  
 
	HRESULT OnPopulateBuffers ( void * Vertices , void * Indices ) ;  
	HRESULT OnRender ( LPDIRECT3DDEVICE9 Device , CEntity * Entity ) ;  
	HRESULT OnSetRenderStates ( LPDIRECT3DDEVICE9 Device ) ;  
	HRESULT OnRestoreRenderStates ( LPDIRECT3DDEVICE9 Device ) ;  
	HRESULT OnSetVertexShaderConstants ( LPDIRECT3DDEVICE9 Device , CEntity * Entity );  
} ; 
 
#endif