mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
44a2efc45c
commit
8a63a62984
@ -1,6 +1,6 @@
|
|||||||
// Filename: LinearEulerIntegrator.cxx
|
// Filename: LinearEulerIntegrator.cxx
|
||||||
// Created by: charles (13Jun00)
|
// Created by: charles (13Jun00)
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "linearEulerIntegrator.h"
|
#include "linearEulerIntegrator.h"
|
||||||
@ -31,13 +31,13 @@ LinearEulerIntegrator::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function : Integrate
|
// Function : Integrate
|
||||||
// Access : Public
|
// Access : Public
|
||||||
// Description : Integrate a step of motion (based on dt) by
|
// Description : Integrate a step of motion (based on dt) by
|
||||||
// applying every force in force_vec to every object
|
// applying every force in force_vec to every object
|
||||||
// in obj_vec.
|
// in obj_vec.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void LinearEulerIntegrator::
|
void LinearEulerIntegrator::
|
||||||
child_integrate(Physical *physical,
|
child_integrate(Physical *physical,
|
||||||
vector< PT(LinearForce) >& forces,
|
vector< PT(LinearForce) >& forces,
|
||||||
float dt) {
|
float dt) {
|
||||||
vector< PT(PhysicsObject) >::const_iterator current_object_iter;
|
vector< PT(PhysicsObject) >::const_iterator current_object_iter;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ child_integrate(Physical *physical,
|
|||||||
// should help.
|
// should help.
|
||||||
|
|
||||||
current_object_iter = physical->get_object_vector().begin();
|
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++) {
|
current_object_iter++) {
|
||||||
LVector3f md_accum_vec, non_md_accum_vec, accel_vec, vel_vec;
|
LVector3f md_accum_vec, non_md_accum_vec, accel_vec, vel_vec;
|
||||||
LPoint3f pos;
|
LPoint3f pos;
|
||||||
@ -121,10 +121,10 @@ child_integrate(Physical *physical,
|
|||||||
// go from force space to object space
|
// go from force space to object space
|
||||||
f = matrices[index++] * cur_force->get_vector(current_object);
|
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)
|
if (cur_force->get_mass_dependent() == true)
|
||||||
md_accum_vec += f;
|
md_accum_vec += f;
|
||||||
else
|
else
|
||||||
non_md_accum_vec += f;
|
non_md_accum_vec += f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Filename: LinearIntegrator.C
|
// Filename: LinearIntegrator.C
|
||||||
// Created by: charles (02Aug00)
|
// Created by: charles (02Aug00)
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <get_rel_pos.h>
|
#include <get_rel_pos.h>
|
||||||
@ -45,7 +45,7 @@ integrate(Physical *physical, vector< PT(LinearForce) > &forces,
|
|||||||
|
|
||||||
vector< PT(PhysicsObject) >::const_iterator current_object_iter;
|
vector< PT(PhysicsObject) >::const_iterator current_object_iter;
|
||||||
current_object_iter = physical->get_object_vector().begin();
|
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++) {
|
current_object_iter++) {
|
||||||
PhysicsObject *current_object = *current_object_iter;
|
PhysicsObject *current_object = *current_object_iter;
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ integrate(Physical *physical, vector< PT(LinearForce) > &forces,
|
|||||||
// processed.
|
// processed.
|
||||||
if (current_object == (PhysicsObject *) NULL)
|
if (current_object == (PhysicsObject *) NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// set the object's last position to its current position before we move it
|
// set the object's last position to its current position before we move it
|
||||||
current_object->set_last_position(current_object->get_position());
|
current_object->set_last_position(current_object->get_position());
|
||||||
|
|
||||||
|
@ -66,24 +66,24 @@
|
|||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
// particle factory selection
|
// particle factory selection
|
||||||
//#define POINT_PARTICLES
|
#define POINT_PARTICLES
|
||||||
#define ZSPIN_PARTICLES
|
//#define ZSPIN_PARTICLES
|
||||||
//#define ORIENTED_PARTICLES
|
//#define ORIENTED_PARTICLES
|
||||||
|
|
||||||
// particle renderer selection
|
// particle renderer selection
|
||||||
#define POINT_PARTICLE_RENDERER
|
//#define POINT_PARTICLE_RENDERER
|
||||||
//#define LINE_PARTICLE_RENDERER
|
//#define LINE_PARTICLE_RENDERER
|
||||||
//#define SPARKLE_PARTICLE_RENDERER
|
//#define SPARKLE_PARTICLE_RENDERER
|
||||||
//#define SPRITE_PARTICLE_RENDERER
|
#define SPRITE_PARTICLE_RENDERER
|
||||||
//#define GEOM_PARTICLE_RENDERER
|
//#define GEOM_PARTICLE_RENDERER
|
||||||
|
|
||||||
// particle emitter selection
|
// particle emitter selection
|
||||||
//#define BOX_EMITTER
|
//#define BOX_EMITTER
|
||||||
//#define DISC_EMITTER
|
#define DISC_EMITTER
|
||||||
//#define LINE_EMITTER
|
//#define LINE_EMITTER
|
||||||
//#define POINT_EMITTER
|
//#define POINT_EMITTER
|
||||||
//#define RECTANGLE_EMITTER
|
//#define RECTANGLE_EMITTER
|
||||||
#define RING_EMITTER
|
//#define RING_EMITTER
|
||||||
//#define SPHERE_SURFACE_EMITTER
|
//#define SPHERE_SURFACE_EMITTER
|
||||||
//#define SPHERE_VOLUME_EMITTER
|
//#define SPHERE_VOLUME_EMITTER
|
||||||
//#define TANGENT_RING_EMITTER
|
//#define TANGENT_RING_EMITTER
|
||||||
@ -434,10 +434,10 @@ event_add_particles(CPT_Event) {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef EMISSION_TYPE_CUSTOM
|
#ifdef EMISSION_TYPE_CUSTOM
|
||||||
#ifdef DISC_EMITTER_OUTER_ANGLE
|
#ifdef DISC_EMITTER_OUTER_ANGLE
|
||||||
pe->set_outer_aoe(DISC_EMITTER_OUTER_ANGLE);
|
pe->set_outer_angle(DISC_EMITTER_OUTER_ANGLE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef DISC_EMITTER_INNER_ANGLE
|
#ifdef DISC_EMITTER_INNER_ANGLE
|
||||||
pe->set_inner_aoe(DISC_EMITTER_INNER_ANGLE);
|
pe->set_inner_angle(DISC_EMITTER_INNER_ANGLE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef DISC_EMITTER_OUTER_MAGNITUDE
|
#ifdef DISC_EMITTER_OUTER_MAGNITUDE
|
||||||
pe->set_outer_magnitude(DISC_EMITTER_OUTER_MAGNITUDE);
|
pe->set_outer_magnitude(DISC_EMITTER_OUTER_MAGNITUDE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user