My Project
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ParaEngine::CParticleElement Class Referenceabstract

base class for a rectangle particle. More...

#include <ParticleElement.h>

Inheritance diagram for ParaEngine::CParticleElement:
ParaEngine::CRefCounted ParaEngine::CBlockPieceParticleElement ParaEngine::WeatherParticle ParaEngine::RainParticle ParaEngine::RainSplashParticle ParaEngine::SnowParticle

Public Member Functions

virtual int RenderParticle (SPRITEVERTEX **pVertexBuffer, SceneState *pSceneState)=0
 generate particle sprite vertex into the vertex buffer based on current camera setting (bill boarding). More...
 
virtual TextureEntityGetTexture ()=0
 
virtual bool IsPointTexture ()
 
virtual bool IsAlphaTested ()
 
- Public Member Functions inherited from ParaEngine::CRefCounted
void addref () const
 add reference count of the object. More...
 
bool delref () const
 decrease reference count of the object. More...
 
int GetRefCount () const
 get the reference count
 
virtual int Release ()
 
CRefCountedAddToAutoReleasePool ()
 addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More...
 

Static Public Member Functions

static void SetParticleVertex (SPRITEVERTEX &vert, float x, float y, float z, float u, float v, DWORD color)
 

Protected Attributes

TextureEntitym_pTexture
 
- Protected Attributes inherited from ParaEngine::CRefCounted
int m_refcount
 

Detailed Description

base class for a rectangle particle.

one can override this class for different kind of particles. particles are sorted by texture, and one should at least implement RenderParticle() for particle tessellation. one need to implement at least RenderParticle and GetTexture() function.

Member Function Documentation

§ RenderParticle()

virtual int ParaEngine::CParticleElement::RenderParticle ( SPRITEVERTEX **  pVertexBuffer,
SceneState pSceneState 
)
pure virtual

generate particle sprite vertex into the vertex buffer based on current camera setting (bill boarding).

Returns
the number of particles generated (1 particle has 2 triangles with 6 vertices).

Implemented in ParaEngine::WeatherParticle, and ParaEngine::CBlockPieceParticleElement.


The documentation for this class was generated from the following file: