From e679ee89aeef2f24915e9f1619388e519459a729 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Fri, 24 Sep 2004 00:44:58 +0000 Subject: [PATCH] adding floor z --- panda/src/particlesystem/particleSystem.I | 26 ++++++++++++++++------- panda/src/particlesystem/particleSystem.h | 5 ++++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/panda/src/particlesystem/particleSystem.I b/panda/src/particlesystem/particleSystem.I index e3b0c6129d..4da65ea58e 100644 --- a/panda/src/particlesystem/particleSystem.I +++ b/panda/src/particlesystem/particleSystem.I @@ -80,7 +80,6 @@ set_litter_size(int new_ls) { // Function : set_litter_spread // Access : Public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_litter_spread(int new_ls) { _litter_spread = new_ls; @@ -90,7 +89,6 @@ set_litter_spread(int new_ls) { // Function : set_renderer // Access : Public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_renderer(BaseParticleRenderer *r) { _renderer = r; @@ -107,7 +105,6 @@ set_renderer(BaseParticleRenderer *r) { // Function : set_emitter // Access : Public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_emitter(BaseParticleEmitter *e) { _emitter = e; @@ -117,7 +114,6 @@ set_emitter(BaseParticleEmitter *e) { // Function : set_factory // Access : Public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_factory(BaseParticleFactory *f) { int pool_size = _particle_pool_size; @@ -127,11 +123,19 @@ set_factory(BaseParticleFactory *f) { set_pool_size(pool_size); } +//////////////////////////////////////////////////////////////////// +// Function : set_floor_z +// Access : Public +//////////////////////////////////////////////////////////////////// +INLINE void ParticleSystem:: +set_floor_z(float z) { + _floor_z = z; +} + //////////////////////////////////////////////////////////////////// // Function : set_active_state // Access : public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_active_system_flag(bool a) { _active_system_flag = a; @@ -141,7 +145,6 @@ set_active_system_flag(bool a) { // Function : set_local_velocity_flag // Access : public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_local_velocity_flag(bool lv) { _local_velocity_flag = lv; @@ -151,7 +154,6 @@ set_local_velocity_flag(bool lv) { // Function : set_spawn_on_death_flag // Access : public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_spawn_on_death_flag(bool sod) { _spawn_on_death_flag = sod; @@ -161,7 +163,6 @@ set_spawn_on_death_flag(bool sod) { // Function : set_system_grows_older_flag // Access : public //////////////////////////////////////////////////////////////////// - INLINE void ParticleSystem:: set_system_grows_older_flag(bool sgo) { _system_grows_older_flag = sgo; @@ -308,6 +309,15 @@ get_factory() const { return _factory; } +//////////////////////////////////////////////////////////////////// +// Function : get_factory +// Access : Public +//////////////////////////////////////////////////////////////////// +INLINE float ParticleSystem:: +get_floor_z() const { + return _floor_z; +} + //////////////////////////////////////////////////////////////////// // Function : get_living_particles // Access : Public diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index d00e221148..097ea3d4e8 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -69,6 +69,7 @@ PUBLISHED: INLINE void set_renderer(BaseParticleRenderer *r); INLINE void set_emitter(BaseParticleEmitter *e); INLINE void set_factory(BaseParticleFactory *f); + INLINE void set_floor_z(float z); INLINE int get_pool_size() const; INLINE float get_birth_rate() const; @@ -87,6 +88,7 @@ PUBLISHED: INLINE BaseParticleRenderer *get_renderer() const; INLINE BaseParticleEmitter *get_emitter() const; INLINE BaseParticleFactory *get_factory() const; + INLINE float get_floor_z() const; // particle template vector @@ -124,6 +126,7 @@ private: int _litter_spread; float _system_age; float _system_lifespan; + float _floor_z; PT(BaseParticleFactory) _factory; PT(BaseParticleEmitter) _emitter; @@ -154,7 +157,7 @@ private: bool _i_was_spawned_flag; public: - friend class ParticleSystemManager; + friend class ParticleSystemManager; // particleSystemManager.h }; #include "particleSystem.I"