SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ParticleEmitter Class Reference

manages smoke particle effects More...

#include <particle_emitter.hpp>

Inheritance diagram for ParticleEmitter:
Inheritance graph
[legend]

Public Member Functions

 ParticleEmitter (const ParticleKind *type, const Vec3 &position, scene::ISceneNode *parent=NULL, bool randomize_initial_y=false, bool important=false)
 
virtual ~ParticleEmitter ()
 Destructor, removes.
 
virtual void update (float dt)
 
void setCreationRateAbsolute (float fraction)
 Sets the absolute creation rate (in particles per second).
 
void setCreationRateRelative (float f)
 Sets the creation rate as a relative fraction between minimum (f=0) and maximum (f=1) of the creation rates defined in the particle kind.
 
int getCreationRate ()
 
float getCreationRateFloat ()
 
void setPosition (const Vec3 &pos)
 Sets the position of the particle emitter.
 
void setRotation (const Vec3 &rot)
 Sets the rotation of the particle emitter.
 
const ParticleKindgetParticlesInfo () const
 
void setParticleType (const ParticleKind *p)
 
void resizeBox (float size)
 
STKParticlegetNode ()
 
void unsetNode ()
 call this if the node was freed otherwise
 
void addHeightMapAffector (Track *t)
 
bool randomizeInitialY () const
 

Private Attributes

STKParticlem_node
 STK particle systems.
 
Vec3 m_position
 
scene::ISceneNode * m_parent
 
scene::IParticleEmitter * m_emitter
 The emitters.
 
const ParticleKindm_particle_type
 
unsigned int m_magic_number
 
int m_emission_decay_rate
 Decay of emission rate, in particles per second.
 
float m_min_rate
 The irrlicht emitter contains this info, but as an int.
 
float m_max_rate
 
bool m_randomize_initial_y
 
bool m_important
 

Detailed Description

manages smoke particle effects

Member Function Documentation

◆ setCreationRateAbsolute()

void ParticleEmitter::setCreationRateAbsolute ( float  f)

Sets the absolute creation rate (in particles per second).

Parameters
fThe creation rate (in particles per second).

◆ setCreationRateRelative()

void ParticleEmitter::setCreationRateRelative ( float  fraction)

Sets the creation rate as a relative fraction between minimum (f=0) and maximum (f=1) of the creation rates defined in the particle kind.

Parameters
fractionFraction to use.

◆ setPosition()

void ParticleEmitter::setPosition ( const Vec3 pos)

Sets the position of the particle emitter.

Parameters
posThe position for the particle emitter.

◆ setRotation()

void ParticleEmitter::setRotation ( const Vec3 rot)

Sets the rotation of the particle emitter.

Parameters
posThe rotation for the particle emitter.

Member Data Documentation

◆ m_emitter

scene::IParticleEmitter* ParticleEmitter::m_emitter
private

The emitters.

Access to these is needed to adjust the number of particles per second.

◆ m_min_rate

float ParticleEmitter::m_min_rate
private

The irrlicht emitter contains this info, but as an int.

We want it as a float


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