![]() |
SAGE
A Simple Academic Game Engine
|
The 3D particle engine. More...
#include <SageParticleEngine.h>


Public Member Functions | |
| CParticleEngine3D (Sage::CCamera *=nullptr) | |
| Constructor. | |
| void | GetRenderList (std::vector< CSpriteDesc3D > &) |
| Get render list. | |
Public Member Functions inherited from Sage::CParticleEngine< CParticle3D, CParticleDesc3D, Vector3 > | |
| CParticleEngine () | |
| Constructor. | |
| virtual | ~CParticleEngine () |
| Destructor. | |
| void | Create (const CParticleDesc3D &d) |
| Create particle. | |
| void | Step () |
| Animation step. | |
| void | Clear (float=0.1f) |
| Fade out all particles. | |
| void | Clear (UINT) |
| Clear out a particular kind of particle. | |
| void | Translate (const Vector3 &) |
| Translate all particles. | |
| void | TranslateTo (const Vector3 &) |
| Translate all particles to a point. | |
| void | SetOrigin (const Vector3 &) |
| Set origin. | |
Private Attributes | |
| Sage::CCamera * | m_pCamera = nullptr |
| Pointer to a camera. | |
Additional Inherited Members | |
Protected Member Functions inherited from Sage::CParticleEngine< CParticle3D, CParticleDesc3D, Vector3 > | |
| void | Move () |
| Move all particles. | |
| const float | GetLifeFraction (const CParticle3D *) const |
| Get life fraction. | |
| void | Cull () |
| Cull old dead particles. | |
| void | Rescale () |
| Compute new particle scales. | |
| void | Fade () |
| Compute new particle alpha channel. | |
Protected Attributes inherited from Sage::CParticleEngine< CParticle3D, CParticleDesc3D, Vector3 > | |
| std::list< CParticle3D * > | m_stdList |
| Particle list. | |
| Vector3 | m_vOrigin |
| Origin in world space. | |
Static Protected Attributes inherited from Sage::CComponent | |
| static std::unique_ptr< CTimer > | m_pTimer = std::make_unique<CTimer>() |
| Pointer to a timer. | |
| static std::unique_ptr< CRandom > | m_pRandom = std::make_unique<CRandom>() |
| Pointer to a PRNG. | |
| static std::unique_ptr< CSound > | m_pSound = std::make_unique<CSound>() |
| Pointer to sound manager. | |
| static std::unique_ptr< CKeyboard > | m_pKeyboard |
| Pointer to a keyboard handler. | |
| static std::unique_ptr< CMouse > | m_pMouse = std::make_unique<CMouse>() |
| Pointer to a mouse handler. | |
| static std::unique_ptr< CController > | m_pController |
| Pointer to a controller. | |
The 3D particle engine can deliver a vector of 3D sprite descriptors that need to be rendered.
| CParticleEngine3D::CParticleEngine3D | ( | Sage::CCamera * | pCamera = nullptr | ) |
| pCamera | Pointer to the camera, defaults to null. |
| void CParticleEngine3D::GetRenderList | ( | std::vector< CSpriteDesc3D > & | 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. |
