Minetest  5.4.0
ParticleSpawner Class Reference

#include <particles.h>

+ Collaboration diagram for ParticleSpawner:

Public Member Functions

 ParticleSpawner (IGameDef *gamedef, LocalPlayer *player, const ParticleSpawnerParameters &p, u16 attached_id, video::ITexture *texture, ParticleManager *p_manager)
 
 ~ParticleSpawner ()=default
 
void step (float dtime, ClientEnvironment *env)
 
bool get_expired ()
 

Private Member Functions

void spawnParticle (ClientEnvironment *env, float radius, const core::matrix4 *attached_absolute_pos_rot_matrix)
 

Private Attributes

ParticleManagerm_particlemanager
 
float m_time
 
IGameDefm_gamedef
 
LocalPlayerm_player
 
ParticleSpawnerParameters p
 
video::ITexture * m_texture
 
std::vector< float > m_spawntimes
 
u16 m_attached_id
 

Constructor & Destructor Documentation

◆ ParticleSpawner()

ParticleSpawner::ParticleSpawner ( IGameDef gamedef,
LocalPlayer player,
const ParticleSpawnerParameters p,
u16  attached_id,
video::ITexture *  texture,
ParticleManager p_manager 
)

◆ ~ParticleSpawner()

ParticleSpawner::~ParticleSpawner ( )
default

Member Function Documentation

◆ get_expired()

bool ParticleSpawner::get_expired ( )
inline

◆ spawnParticle()

◆ step()

void ParticleSpawner::step ( float  dtime,
ClientEnvironment env 
)

References ParticleSpawnerParameters::amount, g_settings, ClientEnvironment::getActiveObject(), Settings::getS16(), m_attached_id, m_spawntimes, m_time, MAP_BLOCKSIZE, p, spawnParticle(), and ParticleSpawnerParameters::time.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_attached_id

u16 ParticleSpawner::m_attached_id
private

Referenced by ParticleSpawner(), and step().

◆ m_gamedef

IGameDef* ParticleSpawner::m_gamedef
private

Referenced by ParticleSpawner(), and spawnParticle().

◆ m_particlemanager

ParticleManager* ParticleSpawner::m_particlemanager
private

Referenced by spawnParticle().

◆ m_player

LocalPlayer* ParticleSpawner::m_player
private

Referenced by ParticleSpawner(), and spawnParticle().

◆ m_spawntimes

std::vector<float> ParticleSpawner::m_spawntimes
private

Referenced by ParticleSpawner(), and step().

◆ m_texture

video::ITexture* ParticleSpawner::m_texture
private

Referenced by ParticleSpawner(), and spawnParticle().

◆ m_time

float ParticleSpawner::m_time
private

Referenced by ParticleSpawner(), and step().

◆ p

ParticleSpawnerParameters ParticleSpawner::p
private

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