#include <sparkleParticleRenderer.h>
Inheritance diagram for SparkleParticleRenderer:
Public Types | |
enum | SparkleParticleLifeScale { SP_NO_SCALE, SP_SCALE } |
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 | |
SparkleParticleRenderer (void) | |
Default Constructor. | |
SparkleParticleRenderer (const SparkleParticleRenderer ©) | |
Copy Constructor. | |
SparkleParticleRenderer (const Colorf ¢er, const Colorf &edge, float birth_radius, float death_radius, SparkleParticleLifeScale life_scale, ParticleRendererAlphaMode alpha_mode) | |
Constructor. | |
virtual | ~SparkleParticleRenderer (void) |
Destructor. | |
virtual BaseParticleRenderer * | make_copy (void) |
child virtual for spawning systems | |
void | set_center_color (const Colorf &c) |
void | set_edge_color (const Colorf &c) |
void | set_birth_radius (float radius) |
void | set_death_radius (float radius) |
void | set_life_scale (SparkleParticleLifeScale) |
const Colorf & | get_center_color (void) const |
const Colorf & | get_edge_color (void) const |
float | get_birth_radius (void) const |
float | get_death_radius (void) const |
SparkleParticleLifeScale | get_life_scale (void) const |
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 | |
float | get_radius (BaseParticle *bp) |
virtual void | birth_particle (int index) |
child birth | |
virtual void | kill_particle (int index) |
child kill | |
virtual void | init_geoms (void) |
initializes the geomnodes | |
virtual void | render (pvector< PointerTo< PhysicsObject > > &po_vector, int ttl_particles) |
populates the GeomLine | |
virtual void | resize_pool (int new_size) |
resizes the render pool. | |
Private Attributes | |
Colorf | _center_color |
Colorf | _edge_color |
float | _birth_radius |
float | _death_radius |
PointerTo< GeomLine > | _line_primitive |
PTA_Vertexf | _vertex_array |
PTA_Colorf | _color_array |
int | _max_pool_size |
SparkleParticleLifeScale | _life_scale |
LPoint3f | _aabb_min |
LPoint3f | _aabb_max |
Friends | |
class | ParticleSystem |
Definition at line 46 of file sparkleParticleRenderer.h.
|
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(). |
|
Definition at line 48 of file sparkleParticleRenderer.h. Referenced by get_center_color(). |
|
Default Constructor.
Definition at line 37 of file sparkleParticleRenderer.cxx. |
|
Copy Constructor.
Definition at line 79 of file sparkleParticleRenderer.cxx. |
|
Constructor.
Definition at line 57 of file sparkleParticleRenderer.cxx. |
|
Destructor.
Definition at line 101 of file sparkleParticleRenderer.cxx. |
|
child birth
Implements BaseParticleRenderer. Definition at line 128 of file sparkleParticleRenderer.cxx. References _color_array, _line_primitive, _max_pool_size, _vertex_array, PointerToArray< Colorf >::empty_array(), PointerToArray< Vertexf >::empty_array(), G_PER_VERTEX, and init_geoms(). |
|
|
|
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. |
|
Definition at line 117 of file sparkleParticleRenderer.I. References _birth_radius, _death_radius, CUBIC_T, BaseParticle::get_parameterized_age(), and LERP. |
|
Definition at line 84 of file sparkleParticleRenderer.I. References _life_scale, INLINE, and SparkleParticleLifeScale. |
|
|
gets current alpha for a particle
Definition at line 93 of file baseParticleRenderer.I. |
|
Definition at line 128 of file sparkleParticleRenderer.I. |
|
Definition at line 95 of file sparkleParticleRenderer.I. References _birth_radius, and INLINE. |
|
Definition at line 106 of file sparkleParticleRenderer.I. References _death_radius. |
|
Definition at line 139 of file sparkleParticleRenderer.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 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 GeomParticleRenderer::kill_particle(). |
|
initializes the geomnodes
Implements BaseParticleRenderer. Definition at line 178 of file sparkleParticleRenderer.cxx. References _aabb_max, and _aabb_min. Referenced by birth_particle(). |
|
|
child kill
Implements BaseParticleRenderer. Definition at line 141 of file sparkleParticleRenderer.cxx. References _line_primitive, GeomNode::add_geom(), BaseParticleRenderer::get_render_node(), and GeomNode::remove_all_geoms(). |
|
child virtual for spawning systems
Implements BaseParticleRenderer. Definition at line 114 of file sparkleParticleRenderer.cxx. |
|
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(). |
|
populates the GeomLine
Definition at line 196 of file sparkleParticleRenderer.cxx. References _aabb_max, _aabb_min, BaseParticleRenderer::_alpha_mode, _center_color, _edge_color, Colorf, BaseParticleRenderer::PR_ALPHA_NONE, and BaseParticleRenderer::PR_ALPHA_USER. |
|
resizes the render pool. Reference counting makes this easy. Implements BaseParticleRenderer. Definition at line 156 of file sparkleParticleRenderer.cxx. References _aabb_min, _color_array, _vertex_array, Colorf, and Vertexf. |
|
Definition at line 42 of file baseParticleRenderer.I. References BaseParticleRenderer::_alpha_mode, INLINE, and BaseParticleRenderer::ParticleRendererAlphaMode. |
|
Definition at line 62 of file sparkleParticleRenderer.I. |
|
Definition at line 29 of file sparkleParticleRenderer.I. References _edge_color, and INLINE. |
|
Definition at line 73 of file sparkleParticleRenderer.I. References _edge_color, Colorf, and INLINE. |
|
Definition at line 40 of file sparkleParticleRenderer.I. References _life_scale, and INLINE. |
|
Definition at line 51 of file sparkleParticleRenderer.I. References _birth_radius. |
|
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 94 of file sparkleParticleRenderer.h. Referenced by init_geoms(), and render(). |
|
Definition at line 94 of file sparkleParticleRenderer.h. Referenced by init_geoms(), render(), and resize_pool(). |
|
Definition at line 90 of file baseParticleRenderer.h. Referenced by BaseParticleRenderer::disable_alpha(), BaseParticleRenderer::enable_alpha(), GeomParticleRenderer::kill_particle(), render(), LineParticleRenderer::render(), and BaseParticleRenderer::set_alpha_mode(). |
|
Definition at line 83 of file sparkleParticleRenderer.h. Referenced by get_birth_radius(), get_edge_color(), and set_life_scale(). |
|
Definition at line 80 of file sparkleParticleRenderer.h. Referenced by render(). |
|
Definition at line 89 of file sparkleParticleRenderer.h. Referenced by birth_particle(), and resize_pool(). |
|
Definition at line 84 of file sparkleParticleRenderer.h. Referenced by get_birth_radius(), and get_life_scale(). |
|
Definition at line 81 of file sparkleParticleRenderer.h. Referenced by render(), set_center_color(), and set_death_radius(). |
|
Definition at line 93 of file sparkleParticleRenderer.h. Referenced by get_center_color(), and set_edge_color(). |
|
Definition at line 86 of file sparkleParticleRenderer.h. Referenced by birth_particle(), and kill_particle(). |
|
Definition at line 91 of file sparkleParticleRenderer.h. Referenced by birth_particle(). |
|
Definition at line 88 of file sparkleParticleRenderer.h. Referenced by birth_particle(), and resize_pool(). |