Luanti 5.16.0-dev
Loading...
Searching...
No Matches
ParticleSpawner Class Reference

#include <particles.h>

Collaboration diagram for ParticleSpawner:

Public Member Functions

 ParticleSpawner (LocalPlayer *player, const ParticleSpawnerParameters &params, u16 attached_id, std::vector< ClientParticleTexture > &&texpool, ParticleManager *p_manager)
void step (float dtime, ClientEnvironment *env)
bool getExpired () const
bool hasActive () const
void decrActive ()

Private Member Functions

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

Private Attributes

size_t m_active
ParticleManagerm_particlemanager
float m_time
LocalPlayerm_player
ParticleSpawnerParameters p
std::vector< ClientParticleTexturem_texpool
std::vector< float > m_spawntimes
u16 m_attached_id

Constructor & Destructor Documentation

◆ ParticleSpawner()

ParticleSpawner::ParticleSpawner ( LocalPlayer * player,
const ParticleSpawnerParameters & params,
u16 attached_id,
std::vector< ClientParticleTexture > && texpool,
ParticleManager * p_manager )

References m_active, m_attached_id, m_particlemanager, m_player, m_spawntimes, m_texpool, m_time, myrand_float(), p, and ParticleManager::reserveParticleSpace().

Here is the call graph for this function:

Member Function Documentation

◆ decrActive()

void ParticleSpawner::decrActive ( )
inline

References m_active.

Referenced by ParticleManager::stepParticles().

Here is the caller graph for this function:

◆ getExpired()

bool ParticleSpawner::getExpired ( ) const
inline

References p.

◆ hasActive()

bool ParticleSpawner::hasActive ( ) const
inline

References m_active.

Referenced by ParticleManager::stepParticles().

Here is the caller graph for this function:

◆ spawnParticle()

◆ step()

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

References g_settings, ClientEnvironment::getGenericCAO(), m_attached_id, m_spawntimes, m_time, MAP_BLOCKSIZE, myrand_float(), p, and spawnParticle().

Here is the call graph for this function:

Member Data Documentation

◆ m_active

size_t ParticleSpawner::m_active
private

◆ m_attached_id

u16 ParticleSpawner::m_attached_id
private

Referenced by ParticleSpawner(), and step().

◆ m_particlemanager

ParticleManager* ParticleSpawner::m_particlemanager
private

Referenced by ParticleSpawner(), and 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_texpool

std::vector<ClientParticleTexture> ParticleSpawner::m_texpool
private

Referenced by ParticleSpawner(), and spawnParticle().

◆ m_time

float ParticleSpawner::m_time
private

◆ p

ParticleSpawnerParameters ParticleSpawner::p
private

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