Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

test_particles.cxx File Reference

#include <framework.h>
#include <eventHandler.h>
#include <chancfg.h>
#include <string>
#include <renderModeTransition.h>
#include <colorTransition.h>
#include <cullFaceTransition.h>
#include <depthTestTransition.h>
#include <depthWriteTransition.h>
#include <textureTransition.h>
#include <lightTransition.h>
#include <materialTransition.h>
#include <transformTransition.h>
#include <get_rel_pos.h>
#include <boundingSphere.h>
#include <geomSphere.h>
#include <geomNode.h>
#include <notify.h>
#include <directionalLight.h>
#include <renderRelation.h>
#include <camera.h>
#include <frustum.h>
#include <orthoProjection.h>
#include <perspectiveProjection.h>
#include <textNode.h>
#include <physicsManager.h>
#include <particleSystem.h>
#include <emitters.h>
#include <particlefactories.h>
#include <forces.h>
#include <sparkleParticleRenderer.h>
#include <pointParticleRenderer.h>
#include <lineParticleRenderer.h>
#include <geomParticleRenderer.h>
#include <spriteParticleRenderer.h>
#include <particleSystemManager.h>
#include <clockObject.h>
#include <nodePath.h>
#include <pointShapeTransition.h>
#include <texture.h>
#include <texturePool.h>
#include <physicalNode.h>
#include <forceNode.h>
#include <linearEulerIntegrator.h>

Go to the source code of this file.

Defines

#define PARTICLE_SYSTEM_MANAGER_FRAME_STEPPING   1
#define PARTICLE_SYSTEM_POOL_SIZE   1000
#define PARTICLE_SYSTEM_BIRTH_RATE   0.01f
#define PARTICLE_SYSTEM_LITTER_SIZE   10
#define PARTICLE_SYSTEM_LITTER_SPREAD   0
#define POINT_PARTICLES
#define LINE_PARTICLE_RENDERER
#define SPHERE_VOLUME_EMITTER
#define PARTICLE_FACTORY_LIFESPAN_BASE   5.0f
#define SPRITE_PARTICLE_RENDERER_ALPHA_DISABLE   false
#define PARTICLE_RENDERER_ALPHA_MODE   BaseParticleRenderer::PR_ALPHA_NONE
#define LINE_PARTICLE_RENDERER_HEAD_COLOR   Colorf(1.0f, 1.0f, 1.0f, 1.0f)
#define LINE_PARTICLE_RENDERER_TAIL_COLOR   Colorf(1.0f, 1.0f, 1.0f, 1.0f)
#define EMISSION_TYPE_EXPLICIT
#define EMITTER_AMPLITUDE   1.0
#define EXPLICIT_LAUNCH_VEC   LVector3f(-1.0f, -1.0f, 1.0f)
#define SPHERE_VOLUME_EMITTER_RADIUS   1.0f

Functions

 PT (ParticleSystem) particle_system=new ParticleSystem(PARTICLE_SYSTEM_POOL_SIZE)
 PT (BaseParticleFactory) pf=new PointParticleFactory
 PT (LineParticleRenderer) pr=new LineParticleRenderer
 PT (SphereVolumeEmitter) pe=new SphereVolumeEmitter
 PT (Texture) texture
 PT (PhysicalNode) pn=new PhysicalNode
 PT (ForceNode) fn=new ForceNode
void event_csn_update (CPT_Event)
void event_add_particles (CPT_Event)
void set_pool_size (int size)
void event_more_particles (CPT_Event)
void event_switch_particle_factory_type (CPT_Event)
void demo_keys (EventHandler &)
int main (int argc, char *argv[])

Variables

PhysicsManager physics_manager
ParticleSystemManager ps_manager
int particles_added = 0


Define Documentation

#define EMISSION_TYPE_EXPLICIT
 

Definition at line 173 of file test_particles.cxx.

#define EMITTER_AMPLITUDE   1.0
 

Definition at line 178 of file test_particles.cxx.

Referenced by event_add_particles().

#define EXPLICIT_LAUNCH_VEC   LVector3f(-1.0f, -1.0f, 1.0f)
 

Definition at line 184 of file test_particles.cxx.

Referenced by event_add_particles().

#define LINE_PARTICLE_RENDERER
 

Definition at line 93 of file test_particles.cxx.

#define LINE_PARTICLE_RENDERER_HEAD_COLOR   Colorf(1.0f, 1.0f, 1.0f, 1.0f)
 

Definition at line 145 of file test_particles.cxx.

Referenced by event_add_particles().

#define LINE_PARTICLE_RENDERER_TAIL_COLOR   Colorf(1.0f, 1.0f, 1.0f, 1.0f)
 

Definition at line 146 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_FACTORY_LIFESPAN_BASE   5.0f
 

Definition at line 112 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_RENDERER_ALPHA_MODE   BaseParticleRenderer::PR_ALPHA_NONE
 

Definition at line 129 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_SYSTEM_BIRTH_RATE   0.01f
 

Definition at line 75 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_SYSTEM_LITTER_SIZE   10
 

Definition at line 77 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_SYSTEM_LITTER_SPREAD   0
 

Definition at line 78 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_SYSTEM_MANAGER_FRAME_STEPPING   1
 

Definition at line 71 of file test_particles.cxx.

Referenced by event_add_particles().

#define PARTICLE_SYSTEM_POOL_SIZE   1000
 

Definition at line 74 of file test_particles.cxx.

#define POINT_PARTICLES
 

Definition at line 87 of file test_particles.cxx.

#define SPHERE_VOLUME_EMITTER
 

Definition at line 106 of file test_particles.cxx.

#define SPHERE_VOLUME_EMITTER_RADIUS   1.0f
 

Definition at line 219 of file test_particles.cxx.

Referenced by event_add_particles().

#define SPRITE_PARTICLE_RENDERER_ALPHA_DISABLE   false
 

Definition at line 128 of file test_particles.cxx.

Referenced by event_add_particles().


Function Documentation

void demo_keys EventHandler  ) 
 

Definition at line 632 of file test_particles.cxx.

References EventHandler::add_hook(), event_add_particles(), event_handler, event_more_particles(), event_switch_particle_factory_type(), and lights.

void event_add_particles CPT_Event   )  [static]
 

Definition at line 304 of file test_particles.cxx.

References EventHandler::add_hook(), PhysicsManager::add_linear_force(), PhysicsManager::attach_linear_integrator(), ParticleSystemManager::attach_particlesystem(), PhysicsManager::attach_physical(), EMITTER_AMPLITUDE, BaseParticleEmitter::ET_CUSTOM, BaseParticleEmitter::ET_RADIATE, event_csn_update(), event_handler, EXPLICIT_LAUNCH_VEC, LINE_PARTICLE_RENDERER_HEAD_COLOR, LINE_PARTICLE_RENDERER_TAIL_COLOR, PARTICLE_FACTORY_LIFESPAN_BASE, PARTICLE_RENDERER_ALPHA_MODE, PARTICLE_SYSTEM_BIRTH_RATE, PARTICLE_SYSTEM_LITTER_SIZE, PARTICLE_SYSTEM_LITTER_SPREAD, PARTICLE_SYSTEM_MANAGER_FRAME_STEPPING, particles_added, physics_manager, POINT_PARTICLE_RENDERER_POINT_SIZE, ps_manager, RADIATE_ORIGIN, render, ParticleSystemManager::set_frame_stepping(), SPHERE_VOLUME_EMITTER_RADIUS, SPRITE_PARTICLE_RENDERER_ALPHA_DISABLE, and texture.

Referenced by demo_keys().

void event_csn_update CPT_Event   )  [static]
 

Definition at line 296 of file test_particles.cxx.

References ParticleSystemManager::do_particles(), PhysicsManager::do_physics(), ClockObject::get_dt(), ClockObject::get_global_clock(), physics_manager, and ps_manager.

Referenced by event_add_particles().

void event_more_particles CPT_Event   )  [static]
 

Definition at line 572 of file test_particles.cxx.

References index, particles_added, and set_pool_size().

Referenced by demo_keys().

void event_switch_particle_factory_type CPT_Event   )  [static]
 

Definition at line 601 of file test_particles.cxx.

References index, and particles_added.

Referenced by demo_keys().

int main int  argc,
char *  argv[]
 

Definition at line 641 of file test_particles.cxx.

References define_keys, demo_keys(), framework_main(), TexturePool::load_texture(), and texture.

PT ForceNode   ) 
 

PT PhysicalNode   ) 
 

PT Texture   ) 
 

PT SphereVolumeEmitter   ) 
 

PT LineParticleRenderer   ) 
 

PT BaseParticleFactory   ) 
 

PT ParticleSystem   ) 
 

void set_pool_size int  size  )  [static]
 

Definition at line 566 of file test_particles.cxx.

Referenced by event_more_particles().


Variable Documentation

int particles_added = 0 [static]
 

Definition at line 232 of file test_particles.cxx.

Referenced by event_add_particles(), event_more_particles(), and event_switch_particle_factory_type().

PhysicsManager physics_manager
 

Definition at line 227 of file test_particles.cxx.

Referenced by event_add_particles(), event_csn_update(), and main().

ParticleSystemManager ps_manager
 

Definition at line 228 of file test_particles.cxx.

Referenced by event_add_particles(), and event_csn_update().


Generated on Fri Apr 18 00:11:03 2003 for Panda by doxygen1.3