*** 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
// 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();
}

View File

@ -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);

View File

@ -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);
}
////////////////////////////////////////////////////////////////////

View File

@ -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;

View File

@ -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);
}

View File

@ -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());
}

View File

@ -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)
{

View File

@ -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);
}
////////////////////////////////////////////////////////////////////

View File

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

View File

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

View File

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

View File

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