14#ifndef BASEPARTICLERENDERER_H
15#define BASEPARTICLERENDERER_H
32class EXPCL_PANDA_PARTICLESYSTEM BaseParticleRenderer :
public ReferenceCount {
34 enum ParticleRendererAlphaMode {
40 PR_NOT_INITIALIZED_YET
43 enum ParticleRendererBlendMethod {
49 virtual ~BaseParticleRenderer();
54 INLINE
void set_alpha_mode(ParticleRendererAlphaMode am);
55 INLINE ParticleRendererAlphaMode get_alpha_mode()
const;
60 INLINE
void set_color_blend_mode(ColorBlendAttrib::Mode bm, ColorBlendAttrib::Operand oa = ColorBlendAttrib::O_zero, ColorBlendAttrib::Operand ob = ColorBlendAttrib::O_zero);
65 virtual void output(std::ostream &out)
const;
66 virtual void write(std::ostream &out,
int indent=0)
const;
69 virtual BaseParticleRenderer *make_copy() = 0;
72 ParticleRendererAlphaMode _alpha_mode;
74 BaseParticleRenderer(ParticleRendererAlphaMode alpha_decay = PR_ALPHA_NONE);
75 BaseParticleRenderer(
const BaseParticleRenderer& copy);
77 void update_alpha_mode(ParticleRendererAlphaMode am);
84 virtual void resize_pool(
int new_size) = 0;
92 PN_stdfloat _user_alpha;
101 virtual void birth_particle(
int index) = 0;
102 virtual void kill_particle(
int index) = 0;
105 virtual void init_geoms() = 0;
107 int ttl_particles) = 0;
109 friend class ParticleSystem;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GeomNode * get_render_node() const
Query the geomnode pointer.
NodePath get_render_node_path() const
Query the geomnode pointer.
void set_color_blend_mode(ColorBlendAttrib::Mode bm, ColorBlendAttrib::Operand oa=ColorBlendAttrib::O_zero, ColorBlendAttrib::Operand ob=ColorBlendAttrib::O_zero)
sets the ColorBlendAttrib on the _render_node
void set_ignore_scale(bool ignore_scale)
Sets the "ignore scale" flag.
bool get_ignore_scale() const
Returns the "ignore scale" flag.
PN_stdfloat get_user_alpha() const
gets alpha for "user" alpha mode
void set_user_alpha(PN_stdfloat ua)
sets alpha for "user" alpha mode
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
A node that holds Geom objects, renderable pieces of geometry.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A body on which physics will be applied.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.