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

panda/src/particlesystem/geomParticleRenderer.h

Go to the documentation of this file.
00001 // Filename: geomParticleRenderer.h
00002 // Created by:  charles (05Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef GEOMPARTICLERENDERER_H
00020 #define GEOMPARTICLERENDERER_H
00021 
00022 #include "baseParticleRenderer.h"
00023 #include "baseParticle.h"
00024 
00025 #include "pandaNode.h"
00026 #include "pointerTo.h"
00027 #include "pointerToArray.h"
00028 
00029 #include "pvector.h"
00030 
00031 class EXPCL_PANDAPHYSICS GeomParticleRenderer : public BaseParticleRenderer {
00032 private:
00033 
00034   PT(PandaNode) _geom_node;
00035 
00036   pvector< PT(PandaNode) > _node_vector;
00037 
00038   int _pool_size;
00039 
00040   // geomparticlerenderer takes advantage of the birth/death functions
00041 
00042   virtual void birth_particle(int index);
00043   virtual void kill_particle(int index);
00044 
00045   virtual void init_geoms(void);
00046   virtual void render(pvector< PT(PhysicsObject) >& po_vector,
00047                       int ttl_particles);
00048 
00049   virtual void resize_pool(int new_size);
00050   void kill_nodes(void);
00051 
00052 PUBLISHED:
00053   GeomParticleRenderer(ParticleRendererAlphaMode am = PR_ALPHA_NONE,
00054                        PandaNode *geom_node = (PandaNode *) NULL);
00055   GeomParticleRenderer(const GeomParticleRenderer& copy);
00056   virtual ~GeomParticleRenderer(void);
00057 
00058   INLINE void set_geom_node(PandaNode *node);
00059   INLINE PandaNode *get_geom_node(void);
00060 
00061   virtual BaseParticleRenderer *make_copy(void);
00062 };
00063 
00064 #include "geomParticleRenderer.I"
00065 
00066 #endif // GEOMPARTICLERENDERER_H

Generated on Fri May 2 00:40:56 2003 for Panda by doxygen1.3