Browse Source

*** empty log message ***

Darren Ranalli 25 years ago
parent
commit
c200a7133e

+ 3 - 1
panda/src/particlesystem/baseParticle.I

@@ -1,6 +1,6 @@
 // Filename: BaseParticle.I
 // Created by:  charles (16Jun00)
-// 
+//
 ////////////////////////////////////////////////////////////////////
 
 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 {
+  if (_lifespan <= 0) return 1.0;
   return _age / _lifespan;
 }
 
 INLINE float BaseParticle::get_parameterized_vel(void) const {
+  if (0 == get_terminal_velocity()) return 0.0;
   return (get_velocity().length()) / get_terminal_velocity();
 }

+ 1 - 1
panda/src/particlesystem/baseParticle.h

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

+ 2 - 2
panda/src/particlesystem/boxEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/discEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/lineEmitter.cxx

@@ -13,7 +13,7 @@
 LineEmitter::
 LineEmitter(void) :
   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);
 }
 

+ 4 - 4
panda/src/particlesystem/particleSystem.I

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

+ 3 - 3
panda/src/particlesystem/particleSystem.cxx

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

+ 2 - 2
panda/src/particlesystem/rectangleEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/ringEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/sphereSurfaceEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/sphereVolumeEmitter.cxx

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

+ 1 - 1
panda/src/particlesystem/tangentRingEmitter.cxx

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