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

test_sprite_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   1024
#define PARTICLE_SYSTEM_BIRTH_RATE   0.02f
#define PARTICLE_SYSTEM_LITTER_SIZE   10
#define PARTICLE_SYSTEM_LITTER_SPREAD   0
#define POINT_PARTICLES
#define POINT_PARTICLE_RENDERER
#define SPHERE_VOLUME_EMITTER
#define PARTICLE_FACTORY_LIFESPAN_BASE   0.5f
#define SPRITE_PARTICLE_RENDERER_ALPHA_DISABLE   false
#define PARTICLE_RENDERER_ALPHA_MODE   BaseParticleRenderer::PR_ALPHA_NONE
#define POINT_PARTICLE_RENDERER_POINT_SIZE   1.0f
#define EMISSION_TYPE_RADIATE
#define EMITTER_AMPLITUDE   1.0
#define RADIATE_ORIGIN   LPoint3f(0.0f, 0.0f, 0.0f)
#define SPHERE_VOLUME_EMITTER_RADIUS   1.0f

Functions

 PT (ParticleSystem) particle_system=new ParticleSystem(1024)
 PT (PointParticleFactory) pf=new PointParticleFactory
 PT (SphereVolumeEmitter) pe=new SphereVolumeEmitter
 PT (PointParticleRenderer) pr=new PointParticleRenderer
 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 demo_keys (EventHandler &)
int main (int argc, char *argv[])

Variables

PhysicsManager physics_manager
ParticleSystemManager ps_manager


Define Documentation

#define EMISSION_TYPE_RADIATE
 

Definition at line 124 of file test_sprite_particles.cxx.

#define EMITTER_AMPLITUDE   1.0
 

Definition at line 127 of file test_sprite_particles.cxx.

#define PARTICLE_FACTORY_LIFESPAN_BASE   0.5f
 

Definition at line 95 of file test_sprite_particles.cxx.

#define PARTICLE_RENDERER_ALPHA_MODE   BaseParticleRenderer::PR_ALPHA_NONE
 

Definition at line 98 of file test_sprite_particles.cxx.

#define PARTICLE_SYSTEM_BIRTH_RATE   0.02f
 

Definition at line 75 of file test_sprite_particles.cxx.

#define PARTICLE_SYSTEM_LITTER_SIZE   10
 

Definition at line 76 of file test_sprite_particles.cxx.

#define PARTICLE_SYSTEM_LITTER_SPREAD   0
 

Definition at line 77 of file test_sprite_particles.cxx.

#define PARTICLE_SYSTEM_MANAGER_FRAME_STEPPING   1
 

Definition at line 71 of file test_sprite_particles.cxx.

#define PARTICLE_SYSTEM_POOL_SIZE   1024
 

Definition at line 74 of file test_sprite_particles.cxx.

#define POINT_PARTICLE_RENDERER
 

Definition at line 86 of file test_sprite_particles.cxx.

#define POINT_PARTICLE_RENDERER_POINT_SIZE   1.0f
 

Definition at line 105 of file test_sprite_particles.cxx.

Referenced by event_add_particles().

#define POINT_PARTICLES
 

Definition at line 83 of file test_sprite_particles.cxx.

#define RADIATE_ORIGIN   LPoint3f(0.0f, 0.0f, 0.0f)
 

Definition at line 133 of file test_sprite_particles.cxx.

Referenced by event_add_particles().

#define SPHERE_VOLUME_EMITTER
 

Definition at line 90 of file test_sprite_particles.cxx.

#define SPHERE_VOLUME_EMITTER_RADIUS   1.0f
 

Definition at line 137 of file test_sprite_particles.cxx.

#define SPRITE_PARTICLE_RENDERER_ALPHA_DISABLE   false
 

Definition at line 97 of file test_sprite_particles.cxx.


Function Documentation

void demo_keys EventHandler  ) 
 

Definition at line 293 of file test_sprite_particles.cxx.

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

void event_add_particles CPT_Event   )  [static]
 

Definition at line 170 of file test_sprite_particles.cxx.

References EventHandler::add_hook(), PhysicsManager::attach_linear_integrator(), ParticleSystemManager::attach_particlesystem(), PhysicsManager::attach_physical(), EMITTER_AMPLITUDE, BaseParticleEmitter::ET_RADIATE, event_csn_update(), event_handler, EXPLICIT_LAUNCH_VEC, PARTICLE_FACTORY_LIFESPAN_BASE, PARTICLE_SYSTEM_BIRTH_RATE, PARTICLE_SYSTEM_LITTER_SIZE, PARTICLE_SYSTEM_LITTER_SPREAD, PARTICLE_SYSTEM_MANAGER_FRAME_STEPPING, physics_manager, BaseParticleRenderer::PR_ALPHA_USER, 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 162 of file test_sprite_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().

int main int  argc,
char *  argv[]
 

Definition at line 300 of file test_sprite_particles.cxx.

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

PT ForceNode   ) 
 

PT PhysicalNode   ) 
 

PT Texture   ) 
 

PT PointParticleRenderer   ) 
 

PT SphereVolumeEmitter   ) 
 

PT PointParticleFactory   ) 
 

PT ParticleSystem   ) 
 


Variable Documentation

PhysicsManager physics_manager
 

Definition at line 143 of file test_sprite_particles.cxx.

ParticleSystemManager ps_manager
 

Definition at line 144 of file test_sprite_particles.cxx.


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