From 8a63a629846fa714c097151f46b57f0313a9e31c Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Thu, 12 Oct 2000 22:25:29 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/physics/linearEulerIntegrator.cxx | 16 ++++++++-------- panda/src/physics/linearIntegrator.cxx | 6 +++--- panda/src/testbed/test_particles.cxx | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/panda/src/physics/linearEulerIntegrator.cxx b/panda/src/physics/linearEulerIntegrator.cxx index 163bb5bd44..4884e8f8a4 100644 --- a/panda/src/physics/linearEulerIntegrator.cxx +++ b/panda/src/physics/linearEulerIntegrator.cxx @@ -1,6 +1,6 @@ // Filename: LinearEulerIntegrator.cxx // Created by: charles (13Jun00) -// +// //////////////////////////////////////////////////////////////////// #include "linearEulerIntegrator.h" @@ -31,13 +31,13 @@ LinearEulerIntegrator:: //////////////////////////////////////////////////////////////////// // Function : Integrate // Access : Public -// Description : Integrate a step of motion (based on dt) by -// applying every force in force_vec to every object +// Description : Integrate a step of motion (based on dt) by +// applying every force in force_vec to every object // in obj_vec. //////////////////////////////////////////////////////////////////// void LinearEulerIntegrator:: -child_integrate(Physical *physical, - vector< PT(LinearForce) >& forces, +child_integrate(Physical *physical, + vector< PT(LinearForce) >& forces, float dt) { vector< PT(PhysicsObject) >::const_iterator current_object_iter; @@ -58,7 +58,7 @@ child_integrate(Physical *physical, // should help. current_object_iter = physical->get_object_vector().begin(); - for (; current_object_iter != physical->get_object_vector().end(); + for (; current_object_iter != physical->get_object_vector().end(); current_object_iter++) { LVector3f md_accum_vec, non_md_accum_vec, accel_vec, vel_vec; LPoint3f pos; @@ -121,10 +121,10 @@ child_integrate(Physical *physical, // go from force space to object space f = matrices[index++] * cur_force->get_vector(current_object); - // tally it into the accum vectors + // tally it into the accum vectors if (cur_force->get_mass_dependent() == true) md_accum_vec += f; - else + else non_md_accum_vec += f; } diff --git a/panda/src/physics/linearIntegrator.cxx b/panda/src/physics/linearIntegrator.cxx index 6eb842504e..4bd579da0e 100644 --- a/panda/src/physics/linearIntegrator.cxx +++ b/panda/src/physics/linearIntegrator.cxx @@ -1,6 +1,6 @@ // Filename: LinearIntegrator.C // Created by: charles (02Aug00) -// +// //////////////////////////////////////////////////////////////////// #include @@ -45,7 +45,7 @@ integrate(Physical *physical, vector< PT(LinearForce) > &forces, vector< PT(PhysicsObject) >::const_iterator current_object_iter; current_object_iter = physical->get_object_vector().begin(); - for (; current_object_iter != physical->get_object_vector().end(); + for (; current_object_iter != physical->get_object_vector().end(); current_object_iter++) { PhysicsObject *current_object = *current_object_iter; @@ -53,7 +53,7 @@ integrate(Physical *physical, vector< PT(LinearForce) > &forces, // processed. if (current_object == (PhysicsObject *) NULL) continue; - + // set the object's last position to its current position before we move it current_object->set_last_position(current_object->get_position()); diff --git a/panda/src/testbed/test_particles.cxx b/panda/src/testbed/test_particles.cxx index c1aa1f02b7..e3a2538422 100644 --- a/panda/src/testbed/test_particles.cxx +++ b/panda/src/testbed/test_particles.cxx @@ -66,24 +66,24 @@ ///////////////////////////////////////////////// // particle factory selection -//#define POINT_PARTICLES -#define ZSPIN_PARTICLES +#define POINT_PARTICLES +//#define ZSPIN_PARTICLES //#define ORIENTED_PARTICLES // particle renderer selection -#define POINT_PARTICLE_RENDERER +//#define POINT_PARTICLE_RENDERER //#define LINE_PARTICLE_RENDERER //#define SPARKLE_PARTICLE_RENDERER -//#define SPRITE_PARTICLE_RENDERER +#define SPRITE_PARTICLE_RENDERER //#define GEOM_PARTICLE_RENDERER // particle emitter selection //#define BOX_EMITTER -//#define DISC_EMITTER +#define DISC_EMITTER //#define LINE_EMITTER //#define POINT_EMITTER //#define RECTANGLE_EMITTER -#define RING_EMITTER +//#define RING_EMITTER //#define SPHERE_SURFACE_EMITTER //#define SPHERE_VOLUME_EMITTER //#define TANGENT_RING_EMITTER @@ -434,10 +434,10 @@ event_add_particles(CPT_Event) { #endif #ifdef EMISSION_TYPE_CUSTOM #ifdef DISC_EMITTER_OUTER_ANGLE - pe->set_outer_aoe(DISC_EMITTER_OUTER_ANGLE); + pe->set_outer_angle(DISC_EMITTER_OUTER_ANGLE); #endif #ifdef DISC_EMITTER_INNER_ANGLE - pe->set_inner_aoe(DISC_EMITTER_INNER_ANGLE); + pe->set_inner_angle(DISC_EMITTER_INNER_ANGLE); #endif #ifdef DISC_EMITTER_OUTER_MAGNITUDE pe->set_outer_magnitude(DISC_EMITTER_OUTER_MAGNITUDE);