*** empty log message ***

This commit is contained in:
Darren Ranalli 2001-01-22 21:59:31 +00:00
parent a7ef42c0f9
commit c200a7133e
12 changed files with 21 additions and 19 deletions

View File

@ -1,6 +1,6 @@
// Filename: BaseParticle.I // Filename: BaseParticle.I
// Created by: charles (16Jun00) // Created by: charles (16Jun00)
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE void BaseParticle::set_age(float age) { INLINE void BaseParticle::set_age(float age) {
@ -28,9 +28,11 @@ INLINE bool BaseParticle::get_alive(void) const {
} }
INLINE float BaseParticle::get_parameterized_age(void) const { INLINE float BaseParticle::get_parameterized_age(void) const {
if (_lifespan <= 0) return 1.0;
return _age / _lifespan; return _age / _lifespan;
} }
INLINE float BaseParticle::get_parameterized_vel(void) const { INLINE float BaseParticle::get_parameterized_vel(void) const {
if (0 == get_terminal_velocity()) return 0.0;
return (get_velocity().length()) / get_terminal_velocity(); return (get_velocity().length()) / get_terminal_velocity();
} }

View File

@ -24,7 +24,7 @@ private:
LPoint3f _last_position; LPoint3f _last_position;
protected: protected:
BaseParticle(int lifespan = 0, bool alive = false); BaseParticle(int lifespan = 1, bool alive = false);
BaseParticle(const BaseParticle &copy); BaseParticle(const BaseParticle &copy);
virtual ~BaseParticle(void); virtual ~BaseParticle(void);

View File

@ -13,8 +13,8 @@
BoxEmitter:: BoxEmitter::
BoxEmitter(void) : BoxEmitter(void) :
BaseParticleEmitter() { BaseParticleEmitter() {
_vmin.set(0.0f, 0.0f, 0.0f); _vmin.set(-0.5f, -0.5f, -0.5f);
_vmax.set(0.0f, 0.0f, 0.0f); _vmax.set( 0.5f, 0.5f, 0.5f);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
DiscEmitter:: DiscEmitter::
DiscEmitter(void) { DiscEmitter(void) {
_radius = 0.0f; _radius = 1.0f;
_inner_aoe = _outer_aoe = 0.0f; _inner_aoe = _outer_aoe = 0.0f;
_inner_magnitude = _outer_magnitude = 0.0f; _inner_magnitude = _outer_magnitude = 0.0f;
_cubic_lerping = false; _cubic_lerping = false;

View File

@ -13,7 +13,7 @@
LineEmitter:: LineEmitter::
LineEmitter(void) : LineEmitter(void) :
BaseParticleEmitter() { BaseParticleEmitter() {
_endpoint1.set(0.0f, 0.0f, 0.0f); _endpoint1.set(1.0f, 0.0f, 0.0f);
_endpoint2.set(0.0f, 0.0f, 0.0f); _endpoint2.set(0.0f, 0.0f, 0.0f);
} }

View File

@ -1,13 +1,13 @@
// Filename: particleSystem.I // Filename: particleSystem.I
// Created by: charles (14Jun00) // Created by: charles (14Jun00)
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function : render // Function : render
// Access : Public // Access : Public
// Description : Populates an atteched GeomNode structure with the // Description : Populates an attached GeomNode structure with the
// particle geometry for rendering. This is a // particle geometry for rendering. This is a
// wrapper for accessability. // wrapper for accessability.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -182,7 +182,7 @@ set_render_parent(Node *node) {
} }
_render_parent = node; _render_parent = node;
_render_arc = new RenderRelation(_render_parent, _render_arc = new RenderRelation(_render_parent,
_renderer->get_render_node()); _renderer->get_render_node());
} }

View File

@ -31,9 +31,9 @@ ParticleSystem::
ParticleSystem(int pool_size) : ParticleSystem(int pool_size) :
Physical(pool_size, false), _particle_pool_size(pool_size) Physical(pool_size, false), _particle_pool_size(pool_size)
{ {
_birth_rate = 0.0f; _birth_rate = 0.5f;
_tics_since_birth = _birth_rate; _tics_since_birth = _birth_rate;
_litter_size = 0; _litter_size = 1;
_litter_spread = 0; _litter_spread = 0;
_living_particles = 0; _living_particles = 0;
_active_system_flag = true; _active_system_flag = true;
@ -64,7 +64,7 @@ ParticleSystem(int pool_size) :
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
ParticleSystem:: ParticleSystem::
ParticleSystem(const ParticleSystem& copy) : ParticleSystem(const ParticleSystem& copy) :
Physical(copy), Physical(copy),
_system_age(0.0f), _system_age(0.0f),
_template_system_flag(false) _template_system_flag(false)
{ {

View File

@ -13,8 +13,8 @@
RectangleEmitter:: RectangleEmitter::
RectangleEmitter(void) : RectangleEmitter(void) :
BaseParticleEmitter() { BaseParticleEmitter() {
_vmin.set(0.0f, 0.0f); _vmin.set(-0.5f, -0.5f);
_vmax.set(0.0f, 0.0f); _vmax.set( 0.5f, 0.5f);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
RingEmitter:: RingEmitter::
RingEmitter(void) : RingEmitter(void) :
_radius(0.0f), _aoe(0.0f) { _radius(1.0f), _aoe(0.0f) {
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
SphereSurfaceEmitter:: SphereSurfaceEmitter::
SphereSurfaceEmitter(void) { SphereSurfaceEmitter(void) {
_radius = 0.0f; _radius = 1.0f;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
SphereVolumeEmitter:: SphereVolumeEmitter::
SphereVolumeEmitter(void) { SphereVolumeEmitter(void) {
_radius = 0.0f; _radius = 1.0f;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
TangentRingEmitter:: TangentRingEmitter::
TangentRingEmitter(void) { TangentRingEmitter(void) {
_radius = 0.0f; _radius = 1.0f;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////