![]() |
The LARC Game Engine
A Simple Game Engine from the Laboratory for Recreational Computing
|
The 3D particle engine. More...
#include <ParticleEngine.h>
Public Member Functions | |
| LParticleEngine3D (LBaseCamera *=nullptr) | |
| Constructor. More... | |
| void | GetRenderList (std::vector< LSpriteDesc3D > &) |
| Get render list. More... | |
Public Member Functions inherited from LParticleEngine< LParticle3D, LParticleDesc3D, Vector3 > | |
| LParticleEngine () | |
| Constructor. | |
| virtual | ~LParticleEngine () |
| Destructor. More... | |
| void | create (const LParticleDesc3D &d) |
| Create particle. More... | |
| void | step () |
| Animation step. More... | |
| void | clear (float=0.1f) |
| Fade out all particles. More... | |
| void | clear (UINT) |
| Clear out a particular kind of particle. More... | |
| void | translate (const Vector3 &) |
| Translate. More... | |
Private Attributes | |
| LBaseCamera * | m_pCamera = nullptr |
| Pointer to a camera. | |
Additional Inherited Members | |
Protected Member Functions inherited from LParticleEngine< LParticle3D, LParticleDesc3D, Vector3 > | |
| void | move () |
| Move all particles. More... | |
| float | GetLifeFraction (const LParticle3D *) |
| Get life fraction. More... | |
| void | cull () |
| Cull old dead particles. More... | |
| void | rescale () |
| Compute new particle scales. More... | |
| void | fade () |
| Compute new particle alpha channel. More... | |
Protected Attributes inherited from LParticleEngine< LParticle3D, LParticleDesc3D, Vector3 > | |
| std::list< LParticle3D * > | m_stdList |
| Particle list. | |
Static Protected Attributes inherited from LComponent | |
| static LTimer * | m_pTimer = &cTimer |
| Pointer to a timer. More... | |
| static LRandom * | m_pRandom = &cRandom |
| Pointer to a PRNG. More... | |
| static LKeyboard * | m_pKeyboard = &cKeyboard |
| Pointer to a keyboard handler. More... | |
| static LXBoxController * | m_pController = &cController |
| Pointer to a XBox controller. More... | |
| static LSound * | m_pAudio = &cAudio |
| Pointer to an audio player. More... | |
The 3D particle engine can deliver a vector of 3D sprite descriptors that need to be rendered.
| LParticleEngine3D::LParticleEngine3D | ( | LBaseCamera * | pCamera = nullptr | ) |
| pCamera | Pointer to the camera, defaults to null. |
| void LParticleEngine3D::GetRenderList | ( | std::vector< LSpriteDesc3D > & | renderlist | ) |
Append the sprite descriptors of all particles to the end of a render list. If a pointer to the camera was provided in the constructor, then the sprite descriptors are first rotated to face the camera.
| renderlist | A vector of 3D sprite descriptors. |