Bubba-3D  0.9.0
Awesome game engine!
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ParticleConf Class Referenceabstract

Public Member Functions

 ParticleConf ()=default
 Configuration for how Particles generated by a ParticleGenerator behaves.
 
virtual chag::float3 initialPosition ()=0
 
virtual chag::float3 initialVelocity ()=0
 
virtual chag::float3 accelerate (chag::float3 velocity)=0
 
virtual float calcLifetime ()=0
 
virtual chag::float3 calcParticleScale ()=0
 
virtual bool loop (float dt)=0
 
void setLooping (bool value)
 

Public Attributes

GLuint blendFunc = GL_ONE
 

Protected Attributes

bool looping = true
 

Detailed Description

Definition at line 23 of file ParticleConf.h.

Member Function Documentation

virtual chag::float3 ParticleConf::accelerate ( chag::float3  velocity)
pure virtual

Accelerates the Particle given it's current velocity. Is called each particle update.

Parameters
velocityThe current velocity of the Particle.
virtual float ParticleConf::calcLifetime ( )
pure virtual

Calculates the Lifetime for the Particle. Is called on particle reset.

virtual chag::float3 ParticleConf::calcParticleScale ( )
pure virtual

Calculates the scale of a particle. Called for each particle the ParticleGenerator spawns each time ParticleGenerator render is called.

virtual chag::float3 ParticleConf::initialPosition ( )
pure virtual

The initial position of a Particle. Is called on particle reset.

Parameters
genPosThe position of the ParticleGenerator spawning the Particle.
virtual chag::float3 ParticleConf::initialVelocity ( )
pure virtual

The initial velocity for the Particle. Is called on particle reset.

virtual bool ParticleConf::loop ( float  dt)
pure virtual

Continue to loop the ParticleGenerator. If false no new particle will be spawned when a Particle dies.

Parameters
Thetime since in seconds since last update call.

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