#include <geomParticleRenderer.h>
Inheritance diagram for GeomParticleRenderer:
Public Types | |
enum | ParticleRendererAlphaMode { PR_ALPHA_NONE, PR_ALPHA_OUT, PR_ALPHA_IN, PR_ALPHA_USER, PR_NOT_INITIALIZED_YET } |
enum | ParticleRendererBlendMethod { PP_NO_BLEND, PP_BLEND_LINEAR, PP_BLEND_CUBIC } |
Public Member Functions | |
GeomParticleRenderer (ParticleRendererAlphaMode am=PR_ALPHA_NONE, PandaNode *geom_node=(PandaNode *) NULL) | |
constructor | |
GeomParticleRenderer (const GeomParticleRenderer ©) | |
copy constructor | |
virtual | ~GeomParticleRenderer (void) |
destructor | |
void | set_geom_node (PandaNode *node) |
PandaNode * | get_geom_node (void) |
virtual BaseParticleRenderer * | make_copy (void) |
dynamic copying | |
GeomNode * | get_render_node (void) const |
Query the geomnode pointer. | |
void | set_alpha_mode (ParticleRendererAlphaMode am) |
ParticleRendererAlphaMode | get_alpha_mode (void) const |
void | set_user_alpha (float ua) |
sets alpha for "user" alpha mode | |
float | get_user_alpha (void) const |
gets alpha for "user" alpha mode | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Protected Member Functions | |
void | update_alpha_mode (ParticleRendererAlphaMode am) |
handles the base class part of alpha updating. | |
void | enable_alpha (void) |
Builds an intermediate node and transition that enables alpha channeling. | |
void | disable_alpha (void) |
kills the intermediate alpha node/arc | |
float | get_cur_alpha (BaseParticle *bp) |
gets current alpha for a particle | |
CPT (RenderState) _render_state | |
Protected Attributes | |
ParticleRendererAlphaMode | _alpha_mode |
Private Member Functions | |
virtual void | birth_particle (int index) |
child birth | |
virtual void | kill_particle (int index) |
child kill | |
virtual void | init_geoms (void) |
links the child nodes to the parent stuff | |
virtual void | render (pvector< PointerTo< PhysicsObject > > &po_vector, int ttl_particles) |
sets the transitions on each arc | |
virtual void | resize_pool (int new_size) |
handles renderer-size resizing. | |
void | kill_nodes (void) |
Private Attributes | |
PointerTo< PandaNode > | _geom_node |
pvector< PointerTo< PandaNode > > | _node_vector |
int | _pool_size |
Friends | |
class | ParticleSystem |
|
Definition at line 65 of file baseParticleRenderer.h. Referenced by BaseParticleRenderer::set_alpha_mode(). |
|
Definition at line 73 of file baseParticleRenderer.h. Referenced by SpriteParticleRenderer::get_y_scale_flag(). |
|
constructor
Definition at line 38 of file geomParticleRenderer.cxx. References _geom_node. |
|
copy constructor
Definition at line 55 of file geomParticleRenderer.cxx. References kill_nodes(). |
|
destructor
Definition at line 70 of file geomParticleRenderer.cxx. |
|
child birth
Implements BaseParticleRenderer. Definition at line 157 of file geomParticleRenderer.cxx. References _node_vector. Referenced by kill_particle(). |
|
|
|
kills the intermediate alpha node/arc
Definition at line 99 of file baseParticleRenderer.cxx. References BaseParticleRenderer::_alpha_mode. Referenced by BaseParticleRenderer::enable_alpha(). |
|
Builds an intermediate node and transition that enables alpha channeling.
Definition at line 86 of file baseParticleRenderer.cxx. References BaseParticleRenderer::_alpha_mode, BaseParticleRenderer::disable_alpha(), and BaseParticleRenderer::PR_ALPHA_NONE. |
|
Definition at line 54 of file baseParticleRenderer.I. References BaseParticleRenderer::_user_alpha. |
|
|
gets current alpha for a particle
Definition at line 93 of file baseParticleRenderer.I. |
|
Definition at line 49 of file geomParticleRenderer.I. |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Query the geomnode pointer.
Definition at line 31 of file baseParticleRenderer.I. References BaseParticleRenderer::init_geoms(), INLINE, and BaseParticleRenderer::update_alpha_mode(). Referenced by SparkleParticleRenderer::kill_particle(), LineParticleRenderer::kill_particle(), and PointParticleRenderer::resize_pool(). |
|
gets alpha for "user" alpha mode
Definition at line 80 of file baseParticleRenderer.I. References BaseParticleRenderer::_user_alpha, and BaseParticleRenderer::PR_ALPHA_USER. Referenced by kill_particle(). |
|
links the child nodes to the parent stuff
Implements BaseParticleRenderer. Definition at line 98 of file geomParticleRenderer.cxx. References _node_vector. |
|
|
Definition at line 133 of file geomParticleRenderer.cxx. References _node_vector. Referenced by GeomParticleRenderer(), and make_copy(). |
|
child kill
Implements BaseParticleRenderer. Definition at line 176 of file geomParticleRenderer.cxx. References BaseParticleRenderer::_alpha_mode, birth_particle(), PhysicsObject::get_position(), BaseParticleRenderer::get_user_alpha(), nassertv, NULL, BaseParticleRenderer::PR_ALPHA_NONE, BaseParticleRenderer::PR_ALPHA_USER, and PandaNode::set_state(). |
|
dynamic copying
Implements BaseParticleRenderer. Definition at line 84 of file geomParticleRenderer.cxx. References kill_nodes(). |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
sets the transitions on each arc
Definition at line 193 of file geomParticleRenderer.cxx. |
|
handles renderer-size resizing.
Implements BaseParticleRenderer. Definition at line 111 of file geomParticleRenderer.cxx. References _node_vector, and NULL. |
|
Definition at line 42 of file baseParticleRenderer.I. References BaseParticleRenderer::_alpha_mode, INLINE, and BaseParticleRenderer::ParticleRendererAlphaMode. |
|
Definition at line 35 of file geomParticleRenderer.I. References _geom_node, and INLINE. |
|
sets alpha for "user" alpha mode
Definition at line 67 of file baseParticleRenderer.I. References BaseParticle::get_parameterized_age(), INLINE, BaseParticleRenderer::PR_ALPHA_IN, and BaseParticleRenderer::PR_ALPHA_OUT. |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
handles the base class part of alpha updating.
Definition at line 112 of file baseParticleRenderer.cxx. Referenced by BaseParticleRenderer::get_render_node(). |
|
Definition at line 109 of file baseParticleRenderer.h. |
|
Definition at line 90 of file baseParticleRenderer.h. Referenced by BaseParticleRenderer::disable_alpha(), BaseParticleRenderer::enable_alpha(), kill_particle(), SparkleParticleRenderer::render(), LineParticleRenderer::render(), and BaseParticleRenderer::set_alpha_mode(). |
|
Definition at line 37 of file geomParticleRenderer.h. Referenced by GeomParticleRenderer(), and set_geom_node(). |
|
Definition at line 39 of file geomParticleRenderer.h. Referenced by birth_particle(), init_geoms(), kill_nodes(), and resize_pool(). |
|
Definition at line 41 of file geomParticleRenderer.h. |