The Joe Engine
Joe's engine programming playground
|
The Particle System class. More...
#include <ParticleSystem.h>
Public Member Functions | |
JEParticleSystem ()=delete | |
Default constructor (deleted). More... | |
JEParticleSystem (const JEParticleSystemSettings &settings) | |
Constructor. More... | |
~JEParticleSystem ()=default | |
Destructor (default). More... | |
const std::vector< JEMeshPointVertex > | GetVertices () |
Get particle vertices. More... | |
const std::vector< uint32_t > & | GetIndices () const |
Get indices list. More... | |
const MeshComponent & | GetMeshComponent () const |
Get mesh component. More... | |
const MaterialComponent & | GetMaterialComponent () const |
Get material component. More... | |
std::vector< glm::vec3 > & | GetPositionData () |
Get all position data. More... | |
std::vector< glm::vec3 > & | GetVelocityData () |
Get all velocity data. More... | |
std::vector< glm::vec3 > & | GetAccelData () |
Get all acceleration data. More... | |
std::vector< float > & | GetLifetimeData () |
Get all lifetime data. More... | |
uint32_t | GetNumParticles () const |
Get number of particles in system (never changes). More... | |
Friends | |
class | JEPhysicsManager |
Physics manager can access private members. More... | |
class | JEEngineInstance |
The engine instance can access private members. More... | |
The Particle System class.
Class that manages the data for a particle system. Position/velocity/acceleration data are all stored in their own linear, contiguous memory containers. Also manages rendering resources like Mesh/Material Components (should change in the future).
|
delete |
Default constructor (deleted).
|
inline |
Constructor.
Initializes important data and populates the various particle data lists.
|
default |
Destructor (default).
|
inline |
Get all acceleration data.
/return reference to the list of acceleration data.
|
inline |
Get indices list.
/return const-reference to the list of indices.
|
inline |
Get all lifetime data.
/return reference to the list of lifetime data.
|
inline |
Get material component.
/return const-reference to the material component.
|
inline |
Get mesh component.
/return const-reference to the mesh component.
|
inline |
Get number of particles in system (never changes).
/return number of particles in the system.
|
inline |
Get all position data.
/return reference to the list of position data.
|
inline |
Get all velocity data.
/return reference to the list of velocity data.
|
inline |
Get particle vertices.
Return an up-to-date list of particle positions for rendering. Also resets particle data if lifetime is over. Note: particles not deleted when their lifetime is over, they just reset to the origin of the system with a new lifetime.
|
friend |
The engine instance can access private members.
|
friend |
Physics manager can access private members.