Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::fx::TexturedEmitter< Heir, MAX_P, P, E, I, A, B > Class Template Reference

Inheritance diagram for ONE::fx::TexturedEmitter< Heir, MAX_P, P, E, I, A, B >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class Heir, unsigned int MAX_P, class P, class E, template< class, class > class I, template< class, class > class A, class B = SimpleBase>
class ONE::fx::TexturedEmitter< Heir, MAX_P, P, E, I, A, B >

base class for ParticleEmitter s that handle textured particles

Apart from fixing some common emitter settings, this class uses an incredibly dirty hack to make different emitter types available to the ParticleSystem.

Author:
Daniel Seibert


Public Types

typedef A< P, HeirActionP
typedef G3D::RenderDevice::BlendFunc BFunc
typedef std::pair< BFunc,
BFunc
BlendMode
typedef E EmissionP
typedef Heir Heir
typedef I< P, HeirInitP
typedef P Particle
typedef util::SmartPointer<
util::Iterator< P >, util::DestructiveCopy
ParticleIt
typedef RenderP::Renderer Renderer
typedef BillboardRenderIM<
P, Heir
RenderP
typedef std::pair< G3D::Vector2,
G3D::Vector2 > 
TexCoords

Public Member Functions

void clear ()
 sets the number of active particles to 0
void emit (unsigned int cnt)
 emits the given number of particles
void finishEmitter (Emitter *, Renderer &)
BlendMode getBlendMode () const
unsigned int getMaxParticles () const
unsigned int getParticleCount () const
ParticleIt getParticles ()
 accesses the active particles
G3D::TextureRef getTexture () const
TexCoords getTextureCoords () const
bool isParticleSortingEnabled () const
 ParticleEmitter ()
void prepareEmitter (Emitter *, Renderer &)
void process (const float &)
void quad (Renderer &rd, G3D::Vector3 verts[], G3D::Vector2 tcoords[], const G3D::Color4 &color)
void render (Emitter *, Renderer &, Particle &)
void render (Renderer &, bool standAlone=true)
 renders this emitter's active particles
virtual void render (G3D::RenderDevice *&, bool)=0
void render (Renderer &, bool)
void setBlendMode (const BlendMode &)
void setParticleSortingEnabled (bool)
 enables or disables particle sorting
void setTexture (const G3D::TextureRef &)
void setTextureCoords (const TexCoords &)

Static Public Member Functions

static void beginRender (Renderer &)
static void endRender (Renderer &rd)

Static Public Attributes

static const BlendMode BM_GLOW
 predefined BlendMode for glowing particles
static const BlendMode BM_NORMAL
 predefined BlendMode for smoky particles
static const BlendMode BM_OFF
 predefined BlendMode for no alpha blending


Member Typedef Documentation

typedef A <P ,Heir > ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::ActionP [inherited]
 

typedef G3D::RenderDevice::BlendFunc ONE::fx::TexturedRender::BFunc [inherited]
 

typedef std::pair<BFunc,BFunc> ONE::fx::TexturedRender::BlendMode [inherited]
 

typedef E ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::EmissionP [inherited]
 

typedef Heir ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::Heir [inherited]
 

typedef I <P ,Heir > ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::InitP [inherited]
 

typedef P ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::Particle [inherited]
 

typedef util::SmartPointer<util::Iterator<P >,util::DestructiveCopy> ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::ParticleIt [inherited]
 

typedef RenderP::Renderer ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::Renderer [inherited]
 

Reimplemented from ONE::fx::TexturedRender.

typedef BillboardRenderIM <P ,Heir > ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::RenderP [inherited]
 

typedef std::pair<G3D::Vector2,G3D::Vector2> ONE::fx::TexturedRender::TexCoords [inherited]
 


Member Function Documentation

void ONE::fx::TexturedRender::beginRender Renderer  )  [inline, static, inherited]
 

void ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::clear  )  [inherited]
 

sets the number of active particles to 0

The particles are not destroyed and remain pooled.

void ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::emit unsigned int  cnt  )  [inherited]
 

emits the given number of particles

The particles are initialized using the initialization policy. cnt must be smaller or equal to the number of available particles, i.e. the maximum number of particles minus the number of active particles.

Parameters:
cnt the number of particles to add

void ONE::fx::TexturedRender::endRender Renderer rd  )  [inline, static, inherited]
 

template<class Particle, class Emitter>
void ONE::fx::BillboardRenderIM< Particle, Emitter >::finishEmitter Emitter *  ,
Renderer
[inline, inherited]
 

TexturedRender::BlendMode ONE::fx::TexturedRender::getBlendMode  )  const [inline, inherited]
 

unsigned int ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::getMaxParticles  )  const [inherited]
 

Returns:
the maximum number of particles

unsigned int ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::getParticleCount  )  const [inherited]
 

Returns:
the number of active particles

ParticleIt ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::getParticles  )  [inherited]
 

accesses the active particles

Dead particles will not be traversed by the iterator.

Returns:
an iterator over this emitter's active particles

template<class H, unsigned int M, class P, class E, template< class, class > class I, template< class, class > class A, class B>
G3D::TextureRef ONE::fx::TexturedEmitter< H, M, P, E, I, A, B >::getTexture  )  const [inline, virtual]
 

Implements ONE::fx::EmitterInterface.

TexturedRender::TexCoords ONE::fx::TexturedRender::getTextureCoords  )  const [inline, inherited]
 

bool ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::isParticleSortingEnabled  )  const [inherited]
 

Returns:
if the particles are sorted before rendering

ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::ParticleEmitter  )  [inherited]
 

template<class Particle, class Emitter>
void ONE::fx::BillboardRenderIM< Particle, Emitter >::prepareEmitter Emitter *  ,
Renderer
[inline, inherited]
 

template<class H, unsigned int M, class P, class E, template< class, class > class I, template< class, class > class A, class B>
void ONE::fx::TexturedEmitter< H, M, P, E, I, A, B >::process const float  )  [inline, virtual]
 

Implements ONE::fx::EmitterInterface.

template<class Particle, class Emitter>
void ONE::fx::BillboardRenderIM< Particle, Emitter >::quad Renderer rd,
G3D::Vector3  verts[],
G3D::Vector2  tcoords[],
const G3D::Color4 &  color
[inline, inherited]
 

template<class Particle, class Emitter>
void ONE::fx::BillboardRenderIM< Particle, Emitter >::render Emitter *  ,
Renderer ,
Particle & 
[inline, inherited]
 

void ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::render Renderer ,
bool  standAlone = true
[inherited]
 

renders this emitter's active particles

Parameters:
standAlone true for stand-alone render, false for externally managed rendering

virtual void ONE::fx::EmitterInterface::render G3D::RenderDevice *&  ,
bool 
[pure virtual, inherited]
 

template<class H, unsigned int M, class P, class E, template< class, class > class I, template< class, class > class A, class B>
void ONE::fx::TexturedEmitter< H, M, P, E, I, A, B >::render Renderer ,
bool 
[inline]
 

void ONE::fx::TexturedRender::setBlendMode const BlendMode  )  [inline, inherited]
 

void ONE::fx::ParticleEmitter< Heir , MAX_P, P , E , I , A , BillboardRenderIM , B >::setParticleSortingEnabled bool   )  [inherited]
 

enables or disables particle sorting

If sorting is enabled, particles are sorted before rendering. This can be quite costly but is necessary for certain drawing techniques.

void ONE::fx::TexturedRender::setTexture const G3D::TextureRef  )  [inline, inherited]
 

void ONE::fx::TexturedRender::setTextureCoords const TexCoords  )  [inline, inherited]
 


Member Data Documentation

const BlendMode ONE::fx::TexturedRender::BM_GLOW [static, inherited]
 

predefined BlendMode for glowing particles

const BlendMode ONE::fx::TexturedRender::BM_NORMAL [static, inherited]
 

predefined BlendMode for smoky particles

const BlendMode ONE::fx::TexturedRender::BM_OFF [static, inherited]
 

predefined BlendMode for no alpha blending


Generated on Wed Sep 7 19:03:14 2005 for ONEngine by  doxygen 1.4.3