molecular
Public Types | Public Member Functions | List of all members
molecular::gfx::CpuParticleSystem< TRenderManager > Class Template Reference

#include <CpuParticleSystem.h>

Inheritance diagram for molecular::gfx::CpuParticleSystem< TRenderManager >:
molecular::gfx::DrawingFunction molecular::gfx::RenderFunction

Public Types

using RenderManager = TRenderManager
 
using TaskQueue = typename RenderManager::TaskQueue
 

Public Member Functions

 CpuParticleSystem (TRenderManager &manager)
 
 ~CpuParticleSystem ()
 
void Execute () override
 
util::AxisAlignedBox GetBounds () const override
 
template<typename Iterator >
void SetEmitters (Iterator begin, Iterator end)
 Set emitters. More...
 
void SetWind (Vector3 wind)
 
void SetAcceleration (Vector3 acceleration)
 Set constant acceleration applied to all particles. More...
 
void SetEmitsPerSecond (float emitsPerSecond)
 Set number of emitted particles per emitter per second. More...
 
void SetMaxParticleAge (float maxParticleAge)
 
- Public Member Functions inherited from molecular::gfx::DrawingFunction
template<class TRenderManager >
 DrawingFunction (TRenderManager &manager)
 
bool BoundsChangedSince (int framecounter) const override
 
- Public Member Functions inherited from molecular::gfx::RenderFunction
template<class TRenderManager >
 RenderFunction (TRenderManager &manager)
 
 RenderFunction (Scoping &scoping, RenderCmdSink &renderer)
 
virtual ~RenderFunction ()
 
virtual void Set (Hash, bool)
 Set bool property with given name. More...
 

Additional Inherited Members

- Protected Member Functions inherited from molecular::gfx::DrawingFunction
RenderCmdSink::ProgramPrepareProgram ()
 
- Protected Member Functions inherited from molecular::gfx::RenderFunction
template<class T >
const T * GetVariable (Hash key)
 Convenience shortcut to a variable pointer from the dynamic scope. More...
 
- Protected Attributes inherited from molecular::gfx::DrawingFunction
ProgramProvidermProgramProvider
 
- Protected Attributes inherited from molecular::gfx::RenderFunction
ScopingmScoping
 
RenderCmdSinkmRenderer
 

Member Typedef Documentation

template<class TRenderManager >
using molecular::gfx::CpuParticleSystem< TRenderManager >::RenderManager = TRenderManager
template<class TRenderManager >
using molecular::gfx::CpuParticleSystem< TRenderManager >::TaskQueue = typename RenderManager::TaskQueue

Constructor & Destructor Documentation

template<class TRenderManager >
molecular::gfx::CpuParticleSystem< TRenderManager >::CpuParticleSystem ( TRenderManager &  manager)
template<class TRenderManager >
molecular::gfx::CpuParticleSystem< TRenderManager >::~CpuParticleSystem ( )

Member Function Documentation

template<class TRenderManager >
void molecular::gfx::CpuParticleSystem< TRenderManager >::Execute ( )
overridevirtual
template<class TRenderManager >
util::AxisAlignedBox molecular::gfx::CpuParticleSystem< TRenderManager >::GetBounds ( ) const
inlineoverridevirtual
template<class TRenderManager >
void molecular::gfx::CpuParticleSystem< TRenderManager >::SetAcceleration ( Vector3  acceleration)

Set constant acceleration applied to all particles.

E.g. gravity.

template<class TRenderManager >
void molecular::gfx::CpuParticleSystem< TRenderManager >::SetEmitsPerSecond ( float  emitsPerSecond)
inline

Set number of emitted particles per emitter per second.

template<class TRenderManager >
template<typename Iterator >
void molecular::gfx::CpuParticleSystem< TRenderManager >::SetEmitters ( Iterator  begin,
Iterator  end 
)

Set emitters.

Replaces all currently set emitters. Sets position only.

Todo:
Set velocity.
template<class TRenderManager >
void molecular::gfx::CpuParticleSystem< TRenderManager >::SetMaxParticleAge ( float  maxParticleAge)
inline
template<class TRenderManager >
void molecular::gfx::CpuParticleSystem< TRenderManager >::SetWind ( Vector3  wind)

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