(void) to ()
This commit is contained in:
parent
d31724f76c
commit
aca6c38b51
|
|
@ -28,24 +28,24 @@ INLINE void BaseParticle::set_alive(bool alive) {
|
|||
_alive = alive;
|
||||
}
|
||||
|
||||
INLINE float BaseParticle::get_age(void) const {
|
||||
INLINE float BaseParticle::get_age() const {
|
||||
return _age;
|
||||
}
|
||||
|
||||
INLINE float BaseParticle::get_lifespan(void) const {
|
||||
INLINE float BaseParticle::get_lifespan() const {
|
||||
return _lifespan;
|
||||
}
|
||||
|
||||
INLINE bool BaseParticle::get_alive(void) const {
|
||||
INLINE bool BaseParticle::get_alive() const {
|
||||
return _alive;
|
||||
}
|
||||
|
||||
INLINE float BaseParticle::get_parameterized_age(void) const {
|
||||
INLINE float BaseParticle::get_parameterized_age() const {
|
||||
if (_lifespan <= 0) return 1.0;
|
||||
return _age / _lifespan;
|
||||
}
|
||||
|
||||
INLINE float BaseParticle::get_parameterized_vel(void) const {
|
||||
INLINE float BaseParticle::get_parameterized_vel() const {
|
||||
if (IS_NEARLY_ZERO(get_terminal_velocity())) return 0.0;
|
||||
return (get_velocity().length()) / get_terminal_velocity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ set_emission_type(emissionType et) {
|
|||
// Description : emission type query
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleEmitter::emissionType BaseParticleEmitter::
|
||||
get_emission_type(void) const {
|
||||
get_emission_type() const {
|
||||
return _emission_type;
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ set_explicit_launch_vector(const LVector3f& elv) {
|
|||
// Description : query for explicit emission launch vector
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LVector3f BaseParticleEmitter::
|
||||
get_explicit_launch_vector(void) const {
|
||||
get_explicit_launch_vector() const {
|
||||
return _explicit_launch_vector;
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ set_radiate_origin(const LPoint3f& ro) {
|
|||
// Description : query for explicit emission launch vector
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint3f BaseParticleEmitter::
|
||||
get_radiate_origin(void) const {
|
||||
get_radiate_origin() const {
|
||||
return _radiate_origin;
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ set_amplitude(float a) {
|
|||
// Description : amplitude query
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleEmitter::
|
||||
get_amplitude(void) const {
|
||||
get_amplitude() const {
|
||||
return _amplitude;
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ set_amplitude_spread(float as) {
|
|||
// Description : amplitude spread query
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleEmitter::
|
||||
get_amplitude_spread(void) const {
|
||||
get_amplitude_spread() const {
|
||||
return _amplitude_spread;
|
||||
}
|
||||
|
||||
|
|
@ -132,6 +132,6 @@ set_offset_force(const LVector3f& of) {
|
|||
// Description : user-defined force
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LVector3f BaseParticleEmitter::
|
||||
get_offset_force(void) const {
|
||||
get_offset_force() const {
|
||||
return _offset_force;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter::
|
||||
BaseParticleEmitter(void) {
|
||||
BaseParticleEmitter() {
|
||||
_emission_type = ET_RADIATE;
|
||||
_explicit_launch_vector.set(1,0,0);
|
||||
_radiate_origin.set(0,0,0);
|
||||
|
|
@ -56,7 +56,7 @@ BaseParticleEmitter(const BaseParticleEmitter ©) {
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter::
|
||||
~BaseParticleEmitter(void) {
|
||||
~BaseParticleEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ set_terminal_velocity_spread(float tvd) {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_lifespan_base(void) const {
|
||||
get_lifespan_base() const {
|
||||
return _lifespan_base;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ get_lifespan_base(void) const {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_lifespan_spread(void) const {
|
||||
get_lifespan_spread() const {
|
||||
return _lifespan_spread;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ get_lifespan_spread(void) const {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_mass_base(void) const {
|
||||
get_mass_base() const {
|
||||
return _mass_base;
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ get_mass_base(void) const {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_mass_spread(void) const {
|
||||
get_mass_spread() const {
|
||||
return _mass_spread;
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ get_mass_spread(void) const {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_terminal_velocity_base(void) const {
|
||||
get_terminal_velocity_base() const {
|
||||
return _terminal_velocity_base;
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ get_terminal_velocity_base(void) const {
|
|||
// Description : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleFactory::
|
||||
get_terminal_velocity_spread(void) const {
|
||||
get_terminal_velocity_spread() const {
|
||||
return _terminal_velocity_spread;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleFactory::
|
||||
BaseParticleFactory(void) {
|
||||
BaseParticleFactory() {
|
||||
_mass_base = 1.0f;
|
||||
_mass_spread = 0.0f;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ BaseParticleFactory(const BaseParticleFactory ©) {
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleFactory::
|
||||
~BaseParticleFactory(void) {
|
||||
~BaseParticleFactory() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ private:
|
|||
virtual void populate_child_particle(BaseParticle *bp) const = 0;
|
||||
|
||||
protected:
|
||||
BaseParticleFactory(void);
|
||||
BaseParticleFactory();
|
||||
BaseParticleFactory(const BaseParticleFactory ©);
|
||||
|
||||
PUBLISHED:
|
||||
virtual ~BaseParticleFactory(void);
|
||||
virtual ~BaseParticleFactory();
|
||||
|
||||
INLINE void set_lifespan_base(float lb);
|
||||
INLINE void set_lifespan_spread(float ls);
|
||||
|
|
@ -58,14 +58,14 @@ PUBLISHED:
|
|||
INLINE void set_terminal_velocity_base(float tvb);
|
||||
INLINE void set_terminal_velocity_spread(float tvs);
|
||||
|
||||
INLINE float get_lifespan_base(void) const;
|
||||
INLINE float get_lifespan_spread(void) const;
|
||||
INLINE float get_mass_base(void) const;
|
||||
INLINE float get_mass_spread(void) const;
|
||||
INLINE float get_terminal_velocity_base(void) const;
|
||||
INLINE float get_terminal_velocity_spread(void) const;
|
||||
INLINE float get_lifespan_base() const;
|
||||
INLINE float get_lifespan_spread() const;
|
||||
INLINE float get_mass_base() const;
|
||||
INLINE float get_mass_spread() const;
|
||||
INLINE float get_terminal_velocity_base() const;
|
||||
INLINE float get_terminal_velocity_spread() const;
|
||||
|
||||
virtual BaseParticle *alloc_particle(void) const = 0;
|
||||
virtual BaseParticle *alloc_particle() const = 0;
|
||||
|
||||
void populate_particle(BaseParticle* bp);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
// Description : Query the geomnode pointer
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE GeomNode *BaseParticleRenderer::
|
||||
get_render_node(void) const {
|
||||
get_render_node() const {
|
||||
return _render_node;
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ set_alpha_mode(BaseParticleRenderer::ParticleRendererAlphaMode am) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleRenderer::ParticleRendererAlphaMode BaseParticleRenderer::
|
||||
get_alpha_mode(void) const {
|
||||
get_alpha_mode() const {
|
||||
return _alpha_mode;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ set_user_alpha(float ua) {
|
|||
// Description : gets alpha for "user" alpha mode
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float BaseParticleRenderer::
|
||||
get_user_alpha(void) const {
|
||||
get_user_alpha() const {
|
||||
return _user_alpha;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ PUBLISHED:
|
|||
INLINE ParticleRendererAlphaMode get_alpha_mode() const;
|
||||
|
||||
INLINE void set_user_alpha(float ua);
|
||||
INLINE float get_user_alpha(void) const;
|
||||
INLINE float get_user_alpha() const;
|
||||
|
||||
virtual void output(ostream &out, unsigned int indent=0) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ set_max_bound(const LPoint3f& vmax) {
|
|||
// Description : boundary accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint3f BoxEmitter::
|
||||
get_min_bound(void) const {
|
||||
get_min_bound() const {
|
||||
return _vmin;
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +52,6 @@ get_min_bound(void) const {
|
|||
// Description : boundary accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint3f BoxEmitter::
|
||||
get_max_bound(void) const {
|
||||
get_max_bound() const {
|
||||
return _vmax;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BoxEmitter::
|
||||
BoxEmitter(void) :
|
||||
BoxEmitter() :
|
||||
BaseParticleEmitter() {
|
||||
_vmin.set(-0.5f, -0.5f, -0.5f);
|
||||
_vmax.set( 0.5f, 0.5f, 0.5f);
|
||||
|
|
@ -48,7 +48,7 @@ BoxEmitter(const BoxEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BoxEmitter::
|
||||
~BoxEmitter(void) {
|
||||
~BoxEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -57,7 +57,7 @@ BoxEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *BoxEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new BoxEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,17 +37,17 @@ private:
|
|||
virtual void assign_initial_velocity(LVector3f& vel);
|
||||
|
||||
PUBLISHED:
|
||||
BoxEmitter(void);
|
||||
BoxEmitter();
|
||||
BoxEmitter(const BoxEmitter ©);
|
||||
virtual ~BoxEmitter(void);
|
||||
virtual ~BoxEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_min_bound(const LPoint3f& vmin);
|
||||
INLINE void set_max_bound(const LPoint3f& vmax);
|
||||
|
||||
INLINE LPoint3f get_min_bound(void) const;
|
||||
INLINE LPoint3f get_max_bound(void) const;
|
||||
INLINE LPoint3f get_min_bound() const;
|
||||
INLINE LPoint3f get_max_bound() const;
|
||||
};
|
||||
|
||||
#include "boxEmitter.I"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DiscEmitter::
|
||||
DiscEmitter(void) {
|
||||
DiscEmitter() {
|
||||
_radius = 1.0f;
|
||||
_inner_aoe = _outer_aoe = 0.0f;
|
||||
_inner_magnitude = _outer_magnitude = 1.0f;
|
||||
|
|
@ -57,7 +57,7 @@ DiscEmitter(const DiscEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DiscEmitter::
|
||||
~DiscEmitter(void) {
|
||||
~DiscEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -66,7 +66,7 @@ DiscEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *DiscEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new DiscEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ private:
|
|||
virtual void assign_initial_velocity(LVector3f& vel);
|
||||
|
||||
PUBLISHED:
|
||||
DiscEmitter(void);
|
||||
DiscEmitter();
|
||||
DiscEmitter(const DiscEmitter ©);
|
||||
virtual ~DiscEmitter(void);
|
||||
virtual ~DiscEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_radius(float r);
|
||||
INLINE void set_outer_angle(float o_angle);
|
||||
|
|
@ -59,12 +59,12 @@ PUBLISHED:
|
|||
INLINE void set_inner_magnitude(float i_mag);
|
||||
INLINE void set_cubic_lerping(bool clerp);
|
||||
|
||||
INLINE float get_radius(void) const;
|
||||
INLINE float get_outer_angle(void) const;
|
||||
INLINE float get_inner_angle(void) const;
|
||||
INLINE float get_outer_magnitude(void) const;
|
||||
INLINE float get_inner_magnitude(void) const;
|
||||
INLINE bool get_cubic_lerping(void) const;
|
||||
INLINE float get_radius() const;
|
||||
INLINE float get_outer_angle() const;
|
||||
INLINE float get_inner_angle() const;
|
||||
INLINE float get_outer_magnitude() const;
|
||||
INLINE float get_inner_magnitude() const;
|
||||
INLINE bool get_cubic_lerping() const;
|
||||
};
|
||||
|
||||
#include "discEmitter.I"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ set_geom_node(PandaNode *node) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE PandaNode *GeomParticleRenderer::
|
||||
get_geom_node(void) {
|
||||
get_geom_node() {
|
||||
return _geom_node;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ GeomParticleRenderer(const GeomParticleRenderer& copy) :
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
GeomParticleRenderer::
|
||||
~GeomParticleRenderer(void) {
|
||||
~GeomParticleRenderer() {
|
||||
kill_nodes();
|
||||
}
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ GeomParticleRenderer::
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
BaseParticleRenderer *GeomParticleRenderer::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new GeomParticleRenderer(*this);
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ make_copy(void) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GeomParticleRenderer::
|
||||
init_geoms(void) {
|
||||
init_geoms() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -107,7 +107,7 @@ resize_pool(int new_size) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GeomParticleRenderer::
|
||||
kill_nodes(void) {
|
||||
kill_nodes() {
|
||||
pvector< PT(PandaNode) >::iterator vec_iter = _node_vector.begin();
|
||||
|
||||
PandaNode *render_node = get_render_node();
|
||||
|
|
|
|||
|
|
@ -42,23 +42,23 @@ private:
|
|||
virtual void birth_particle(int index);
|
||||
virtual void kill_particle(int index);
|
||||
|
||||
virtual void init_geoms(void);
|
||||
virtual void init_geoms();
|
||||
virtual void render(pvector< PT(PhysicsObject) >& po_vector,
|
||||
int ttl_particles);
|
||||
|
||||
virtual void resize_pool(int new_size);
|
||||
void kill_nodes(void);
|
||||
void kill_nodes();
|
||||
|
||||
PUBLISHED:
|
||||
GeomParticleRenderer(ParticleRendererAlphaMode am = PR_ALPHA_NONE,
|
||||
PandaNode *geom_node = (PandaNode *) NULL);
|
||||
GeomParticleRenderer(const GeomParticleRenderer& copy);
|
||||
virtual ~GeomParticleRenderer(void);
|
||||
virtual ~GeomParticleRenderer();
|
||||
|
||||
INLINE void set_geom_node(PandaNode *node);
|
||||
INLINE PandaNode *get_geom_node(void);
|
||||
INLINE PandaNode *get_geom_node();
|
||||
|
||||
virtual BaseParticleRenderer *make_copy(void);
|
||||
virtual BaseParticleRenderer *make_copy();
|
||||
};
|
||||
|
||||
#include "geomParticleRenderer.I"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ set_endpoint2(const LPoint3f& point) {
|
|||
// Description : endpoint accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint3f LineEmitter::
|
||||
get_endpoint1(void) const {
|
||||
get_endpoint1() const {
|
||||
return _endpoint1;
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +52,6 @@ get_endpoint1(void) const {
|
|||
// Description : endpoint accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint3f LineEmitter::
|
||||
get_endpoint2(void) const {
|
||||
get_endpoint2() const {
|
||||
return _endpoint2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
LineEmitter::
|
||||
LineEmitter(void) :
|
||||
LineEmitter() :
|
||||
BaseParticleEmitter() {
|
||||
_endpoint1.set(1.0f, 0.0f, 0.0f);
|
||||
_endpoint2.set(0.0f, 0.0f, 0.0f);
|
||||
|
|
@ -48,7 +48,7 @@ LineEmitter(const LineEmitter ©) :
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
LineEmitter::
|
||||
~LineEmitter(void) {
|
||||
~LineEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -57,7 +57,7 @@ LineEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *LineEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new LineEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,17 +28,17 @@
|
|||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDAPHYSICS LineEmitter : public BaseParticleEmitter {
|
||||
PUBLISHED:
|
||||
LineEmitter(void);
|
||||
LineEmitter();
|
||||
LineEmitter(const LineEmitter ©);
|
||||
virtual ~LineEmitter(void);
|
||||
virtual ~LineEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_endpoint1(const LPoint3f& point);
|
||||
INLINE void set_endpoint2(const LPoint3f& point);
|
||||
|
||||
INLINE LPoint3f get_endpoint1(void) const;
|
||||
INLINE LPoint3f get_endpoint2(void) const;
|
||||
INLINE LPoint3f get_endpoint1() const;
|
||||
INLINE LPoint3f get_endpoint2() const;
|
||||
|
||||
virtual void output(ostream &out, unsigned int indent=0) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ set_tail_color(const Colorf& c) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& LineParticleRenderer::
|
||||
get_head_color(void) const {
|
||||
get_head_color() const {
|
||||
return _head_color;
|
||||
}
|
||||
|
||||
|
|
@ -48,6 +48,6 @@ get_head_color(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& LineParticleRenderer::
|
||||
get_tail_color(void) const {
|
||||
get_tail_color() const {
|
||||
return _tail_color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
LineParticleRenderer::
|
||||
LineParticleRenderer(void) :
|
||||
LineParticleRenderer() :
|
||||
_head_color(Colorf(1.0f, 1.0f, 1.0f, 1.0f)),
|
||||
_tail_color(Colorf(1.0f, 1.0f, 1.0f, 1.0f)) {
|
||||
_line_primitive = new GeomLine;
|
||||
|
|
@ -74,7 +74,7 @@ LineParticleRenderer(const LineParticleRenderer& copy) :
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
LineParticleRenderer::
|
||||
~LineParticleRenderer(void) {
|
||||
~LineParticleRenderer() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -84,7 +84,7 @@ LineParticleRenderer::
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
BaseParticleRenderer *LineParticleRenderer::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new LineParticleRenderer(*this);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ resize_pool(int new_size) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
void LineParticleRenderer::
|
||||
init_geoms(void) {
|
||||
init_geoms() {
|
||||
_line_primitive->set_num_prims(0);
|
||||
|
||||
GeomNode *render_node = get_render_node();
|
||||
|
|
|
|||
|
|
@ -35,21 +35,21 @@
|
|||
|
||||
class EXPCL_PANDAPHYSICS LineParticleRenderer : public BaseParticleRenderer {
|
||||
PUBLISHED:
|
||||
LineParticleRenderer(void);
|
||||
LineParticleRenderer();
|
||||
LineParticleRenderer(const LineParticleRenderer& copy);
|
||||
LineParticleRenderer(const Colorf& head,
|
||||
const Colorf& tail,
|
||||
ParticleRendererAlphaMode alpha_mode);
|
||||
|
||||
virtual ~LineParticleRenderer(void);
|
||||
virtual ~LineParticleRenderer();
|
||||
|
||||
virtual BaseParticleRenderer *make_copy(void);
|
||||
virtual BaseParticleRenderer *make_copy();
|
||||
|
||||
INLINE void set_head_color(const Colorf& c);
|
||||
INLINE void set_tail_color(const Colorf& c);
|
||||
|
||||
INLINE const Colorf& get_head_color(void) const;
|
||||
INLINE const Colorf& get_tail_color(void) const;
|
||||
INLINE const Colorf& get_head_color() const;
|
||||
INLINE const Colorf& get_tail_color() const;
|
||||
|
||||
virtual void output(ostream &out, unsigned int indent=0) const;
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
virtual void birth_particle(int index);
|
||||
virtual void kill_particle(int index);
|
||||
virtual void init_geoms(void);
|
||||
virtual void init_geoms();
|
||||
virtual void render(pvector< PT(PhysicsObject) >& po_vector,
|
||||
int ttl_particles);
|
||||
virtual void resize_pool(int new_size);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE void OrientedParticle::
|
||||
set_velocity(void) {
|
||||
set_velocity() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -31,5 +31,5 @@ set_velocity(void) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE void OrientedParticle::
|
||||
set_orientation(void) {
|
||||
set_orientation() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ OrientedParticle(const OrientedParticle ©) :
|
|||
// Description : simple destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
OrientedParticle::
|
||||
~OrientedParticle(void) {
|
||||
~OrientedParticle() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -54,7 +54,7 @@ OrientedParticle::
|
|||
// Description : simple destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PhysicsObject *OrientedParticle::
|
||||
make_copy(void) const {
|
||||
make_copy() const {
|
||||
return new OrientedParticle(*this);
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ make_copy(void) const {
|
|||
// Description : particle init routine
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void OrientedParticle::
|
||||
init(void) {
|
||||
init() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -73,7 +73,7 @@ init(void) {
|
|||
// Description : particle death routine
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void OrientedParticle::
|
||||
die(void) {
|
||||
die() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -84,5 +84,5 @@ die(void) {
|
|||
// stuff, or oriented particles will not rotate.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void OrientedParticle::
|
||||
update(void) {
|
||||
update() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ set_final_orientation(const LOrientationf &o) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
LOrientationf OrientedParticleFactory::
|
||||
get_initial_orientation(void) const {
|
||||
get_initial_orientation() const {
|
||||
return _initial_orientation;
|
||||
}
|
||||
|
||||
|
|
@ -48,6 +48,6 @@ get_initial_orientation(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
LOrientationf OrientedParticleFactory::
|
||||
get_final_orientation(void) const {
|
||||
get_final_orientation() const {
|
||||
return _final_orientation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE void ParticleSystem::
|
||||
render(void) {
|
||||
render() {
|
||||
_renderer->render(_physics_objects, _living_particles);
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ render(void) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE void ParticleSystem::
|
||||
induce_labor(void) {
|
||||
induce_labor() {
|
||||
_tics_since_birth = _birth_rate;
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ add_spawn_template(ParticleSystem *ps) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void ParticleSystem::
|
||||
clear_spawn_templates(void) {
|
||||
clear_spawn_templates() {
|
||||
_spawn_templates.erase(_spawn_templates.begin(),
|
||||
_spawn_templates.end());
|
||||
}
|
||||
|
|
@ -250,7 +250,7 @@ clear_spawn_templates(void) {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int ParticleSystem::
|
||||
get_pool_size(void) const {
|
||||
get_pool_size() const {
|
||||
return _particle_pool_size;
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +259,7 @@ get_pool_size(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ParticleSystem::
|
||||
get_birth_rate(void) const {
|
||||
get_birth_rate() const {
|
||||
return _birth_rate;
|
||||
}
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ get_birth_rate(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int ParticleSystem::
|
||||
get_litter_size(void) const {
|
||||
get_litter_size() const {
|
||||
return _litter_size;
|
||||
}
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ get_litter_size(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int ParticleSystem::
|
||||
get_litter_spread(void) const {
|
||||
get_litter_spread() const {
|
||||
return _litter_spread;
|
||||
}
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ get_litter_spread(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleRenderer *ParticleSystem::
|
||||
get_renderer(void) const {
|
||||
get_renderer() const {
|
||||
return _renderer;
|
||||
}
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ get_renderer(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleEmitter *ParticleSystem::
|
||||
get_emitter(void) const {
|
||||
get_emitter() const {
|
||||
return _emitter;
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ get_emitter(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleFactory *ParticleSystem::
|
||||
get_factory(void) const {
|
||||
get_factory() const {
|
||||
return _factory;
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ get_factory(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int ParticleSystem::
|
||||
get_living_particles(void) const {
|
||||
get_living_particles() const {
|
||||
return _living_particles;
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ get_living_particles(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool ParticleSystem::
|
||||
get_active_system_flag(void) const {
|
||||
get_active_system_flag() const {
|
||||
return _active_system_flag;
|
||||
}
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ get_active_system_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool ParticleSystem::
|
||||
get_local_velocity_flag(void) const {
|
||||
get_local_velocity_flag() const {
|
||||
return _local_velocity_flag;
|
||||
}
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ get_local_velocity_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool ParticleSystem::
|
||||
get_spawn_on_death_flag(void) const {
|
||||
get_spawn_on_death_flag() const {
|
||||
return _spawn_on_death_flag;
|
||||
}
|
||||
|
||||
|
|
@ -349,7 +349,7 @@ get_spawn_on_death_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool ParticleSystem::
|
||||
get_system_grows_older_flag(void) const {
|
||||
get_system_grows_older_flag() const {
|
||||
return _system_grows_older_flag;
|
||||
}
|
||||
|
||||
|
|
@ -358,7 +358,7 @@ get_system_grows_older_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ParticleSystem::
|
||||
get_system_lifespan(void) const {
|
||||
get_system_lifespan() const {
|
||||
return _system_lifespan;
|
||||
}
|
||||
|
||||
|
|
@ -367,7 +367,7 @@ get_system_lifespan(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ParticleSystem::
|
||||
get_system_age(void) const {
|
||||
get_system_age() const {
|
||||
return _system_age;
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ get_system_age(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool ParticleSystem::
|
||||
get_i_was_spawned_flag(void) const {
|
||||
get_i_was_spawned_flag() const {
|
||||
return _i_was_spawned_flag;
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ get_i_was_spawned_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PandaNode *ParticleSystem::
|
||||
get_spawn_render_node(void) const {
|
||||
get_spawn_render_node() const {
|
||||
return _spawn_render_node;
|
||||
}
|
||||
|
||||
|
|
@ -394,6 +394,6 @@ get_spawn_render_node(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PandaNode *ParticleSystem::
|
||||
get_render_parent(void) const {
|
||||
get_render_parent() const {
|
||||
return _render_parent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ private:
|
|||
int sanity_check();
|
||||
#endif
|
||||
|
||||
bool birth_particle(void);
|
||||
bool birth_particle();
|
||||
void kill_particle(int pool_index);
|
||||
void birth_litter(void);
|
||||
void birth_litter();
|
||||
void resize_pool(int size);
|
||||
|
||||
pdeque< int > _free_particle_fifo;
|
||||
|
|
@ -100,7 +100,7 @@ PUBLISHED:
|
|||
|
||||
ParticleSystem(int pool_size = 0);
|
||||
ParticleSystem(const ParticleSystem& copy);
|
||||
~ParticleSystem(void);
|
||||
~ParticleSystem();
|
||||
|
||||
// access/queries
|
||||
INLINE void set_pool_size(int size);
|
||||
|
|
@ -120,33 +120,33 @@ PUBLISHED:
|
|||
INLINE void set_emitter(BaseParticleEmitter *e);
|
||||
INLINE void set_factory(BaseParticleFactory *f);
|
||||
|
||||
INLINE int get_pool_size(void) const;
|
||||
INLINE float get_birth_rate(void) const;
|
||||
INLINE int get_litter_size(void) const;
|
||||
INLINE int get_litter_spread(void) const;
|
||||
INLINE bool get_local_velocity_flag(void) const;
|
||||
INLINE bool get_system_grows_older_flag(void) const;
|
||||
INLINE float get_system_lifespan(void) const;
|
||||
INLINE float get_system_age(void) const;
|
||||
INLINE bool get_active_system_flag(void) const;
|
||||
INLINE bool get_spawn_on_death_flag(void) const;
|
||||
INLINE PandaNode *get_spawn_render_node(void) const;
|
||||
INLINE bool get_i_was_spawned_flag(void) const;
|
||||
INLINE int get_living_particles(void) const;
|
||||
INLINE PandaNode *get_render_parent(void) const;
|
||||
INLINE BaseParticleRenderer *get_renderer(void) const;
|
||||
INLINE BaseParticleEmitter *get_emitter(void) const;
|
||||
INLINE BaseParticleFactory *get_factory(void) const;
|
||||
INLINE int get_pool_size() const;
|
||||
INLINE float get_birth_rate() const;
|
||||
INLINE int get_litter_size() const;
|
||||
INLINE int get_litter_spread() const;
|
||||
INLINE bool get_local_velocity_flag() const;
|
||||
INLINE bool get_system_grows_older_flag() const;
|
||||
INLINE float get_system_lifespan() const;
|
||||
INLINE float get_system_age() const;
|
||||
INLINE bool get_active_system_flag() const;
|
||||
INLINE bool get_spawn_on_death_flag() const;
|
||||
INLINE PandaNode *get_spawn_render_node() const;
|
||||
INLINE bool get_i_was_spawned_flag() const;
|
||||
INLINE int get_living_particles() const;
|
||||
INLINE PandaNode *get_render_parent() const;
|
||||
INLINE BaseParticleRenderer *get_renderer() const;
|
||||
INLINE BaseParticleEmitter *get_emitter() const;
|
||||
INLINE BaseParticleFactory *get_factory() const;
|
||||
|
||||
// particle template vector
|
||||
|
||||
INLINE void add_spawn_template(ParticleSystem *ps);
|
||||
INLINE void clear_spawn_templates(void);
|
||||
INLINE void clear_spawn_templates();
|
||||
|
||||
// methods
|
||||
|
||||
INLINE void render(void);
|
||||
INLINE void induce_labor(void);
|
||||
INLINE void render();
|
||||
INLINE void induce_labor();
|
||||
void update(float dt);
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ PUBLISHED:
|
|||
ParticleSystemManager(int every_nth_frame = 1);
|
||||
|
||||
INLINE void set_frame_stepping(int every_nth_frame);
|
||||
INLINE int get_frame_stepping(void) const;
|
||||
INLINE int get_frame_stepping() const;
|
||||
|
||||
INLINE void attach_particlesystem(ParticleSystem *ps);
|
||||
void remove_particlesystem(ParticleSystem *ps);
|
||||
INLINE void clear(void);
|
||||
INLINE void clear();
|
||||
|
||||
void do_particles(float dt);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ set_location(const LPoint3f& p) {
|
|||
}
|
||||
|
||||
INLINE LPoint3f PointEmitter::
|
||||
get_location(void) const {
|
||||
get_location() const {
|
||||
return _location;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PointEmitter::
|
||||
PointEmitter(void) :
|
||||
PointEmitter() :
|
||||
BaseParticleEmitter() {
|
||||
_location.set(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ PointEmitter(const PointEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PointEmitter::
|
||||
~PointEmitter(void) {
|
||||
~PointEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -55,7 +55,7 @@ PointEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *PointEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new PointEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ PointParticle(const PointParticle ©) :
|
|||
// Description : simple destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PointParticle::
|
||||
~PointParticle(void) {
|
||||
~PointParticle() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -55,7 +55,7 @@ PointParticle::
|
|||
// Description : dynamic copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PhysicsObject *PointParticle::
|
||||
make_copy(void) const {
|
||||
make_copy() const {
|
||||
return new PointParticle(*this);
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ make_copy(void) const {
|
|||
// Description : particle death routine
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PointParticle::
|
||||
die(void) {
|
||||
die() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -74,7 +74,7 @@ die(void) {
|
|||
// Description : particle init routine
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PointParticle::
|
||||
init(void) {
|
||||
init() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -83,5 +83,5 @@ init(void) {
|
|||
// Description : particle update
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PointParticle::
|
||||
update(void) {
|
||||
update() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ class EXPCL_PANDAPHYSICS PointParticle : public BaseParticle {
|
|||
public:
|
||||
PointParticle(int lifespan = 0, bool alive = false);
|
||||
PointParticle(const PointParticle ©);
|
||||
virtual ~PointParticle(void);
|
||||
virtual ~PointParticle();
|
||||
|
||||
virtual void init(void);
|
||||
virtual void die(void);
|
||||
virtual void update(void);
|
||||
virtual void init();
|
||||
virtual void die();
|
||||
virtual void update();
|
||||
|
||||
virtual PhysicsObject *make_copy(void) const;
|
||||
virtual PhysicsObject *make_copy() const;
|
||||
};
|
||||
|
||||
#endif // POINTPARTICLE_H
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
// Description : default constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PointParticleFactory::
|
||||
PointParticleFactory(void) :
|
||||
PointParticleFactory() :
|
||||
BaseParticleFactory() {
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ PointParticleFactory(const PointParticleFactory ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PointParticleFactory::
|
||||
~PointParticleFactory(void) {
|
||||
~PointParticleFactory() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -66,6 +66,6 @@ populate_child_particle(BaseParticle *bp) const {
|
|||
// Description : child particle generation function
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticle *PointParticleFactory::
|
||||
alloc_particle(void) const {
|
||||
alloc_particle() const {
|
||||
return new PointParticle;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@
|
|||
|
||||
class EXPCL_PANDAPHYSICS PointParticleFactory : public BaseParticleFactory {
|
||||
private:
|
||||
virtual BaseParticle *alloc_particle(void) const;
|
||||
virtual BaseParticle *alloc_particle() const;
|
||||
virtual void populate_child_particle(BaseParticle *bp) const;
|
||||
|
||||
PUBLISHED:
|
||||
PointParticleFactory(void);
|
||||
PointParticleFactory();
|
||||
PointParticleFactory(const PointParticleFactory ©);
|
||||
virtual ~PointParticleFactory(void);
|
||||
virtual ~PointParticleFactory();
|
||||
};
|
||||
|
||||
#endif // POINTPARTICLEFACTORY_H
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ set_blend_method(BaseParticleRenderer::ParticleRendererBlendMethod bm) {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float PointParticleRenderer::
|
||||
get_point_size(void) const {
|
||||
get_point_size() const {
|
||||
return _point_size;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ get_point_size(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& PointParticleRenderer::
|
||||
get_start_color(void) const {
|
||||
get_start_color() const {
|
||||
return _start_color;
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ get_start_color(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& PointParticleRenderer::
|
||||
get_end_color(void) const {
|
||||
get_end_color() const {
|
||||
return _end_color;
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ get_end_color(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PointParticleRenderer::PointParticleBlendType PointParticleRenderer::
|
||||
get_blend_type(void) const {
|
||||
get_blend_type() const {
|
||||
return _blend_type;
|
||||
}
|
||||
|
||||
|
|
@ -103,6 +103,6 @@ get_blend_type(void) const {
|
|||
// Access : Public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleRenderer::ParticleRendererBlendMethod PointParticleRenderer::
|
||||
get_blend_method(void) const {
|
||||
get_blend_method() const {
|
||||
return _blend_method;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ PUBLISHED:
|
|||
const Colorf& sc = Colorf(1.0f, 1.0f, 1.0f, 1.0f),
|
||||
const Colorf& ec = Colorf(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
|
||||
virtual ~PointParticleRenderer(void);
|
||||
virtual ~PointParticleRenderer();
|
||||
|
||||
virtual BaseParticleRenderer *make_copy(void);
|
||||
virtual BaseParticleRenderer *make_copy();
|
||||
|
||||
INLINE void set_point_size(float point_size);
|
||||
INLINE void set_start_color(const Colorf& sc);
|
||||
|
|
@ -61,11 +61,11 @@ PUBLISHED:
|
|||
INLINE void set_blend_type(PointParticleBlendType bt);
|
||||
INLINE void set_blend_method(ParticleRendererBlendMethod bm);
|
||||
|
||||
INLINE float get_point_size(void) const;
|
||||
INLINE const Colorf& get_start_color(void) const;
|
||||
INLINE const Colorf& get_end_color(void) const;
|
||||
INLINE PointParticleBlendType get_blend_type(void) const;
|
||||
INLINE ParticleRendererBlendMethod get_blend_method(void) const;
|
||||
INLINE float get_point_size() const;
|
||||
INLINE const Colorf& get_start_color() const;
|
||||
INLINE const Colorf& get_end_color() const;
|
||||
INLINE PointParticleBlendType get_blend_type() const;
|
||||
INLINE ParticleRendererBlendMethod get_blend_method() const;
|
||||
|
||||
private:
|
||||
Colorf _start_color, _end_color;
|
||||
|
|
@ -87,7 +87,7 @@ private:
|
|||
|
||||
virtual void birth_particle(int index);
|
||||
virtual void kill_particle(int index);
|
||||
virtual void init_geoms(void);
|
||||
virtual void init_geoms();
|
||||
virtual void render(pvector< PT(PhysicsObject) >& po_vector,
|
||||
int ttl_particles);
|
||||
virtual void resize_pool(int new_size);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ set_max_bound(const LPoint2f& vmax) {
|
|||
// Description : boundary get
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint2f RectangleEmitter::
|
||||
get_min_bound(void) const {
|
||||
get_min_bound() const {
|
||||
return _vmin;
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +52,6 @@ get_min_bound(void) const {
|
|||
// Description : boundary get
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE LPoint2f RectangleEmitter::
|
||||
get_max_bound(void) const {
|
||||
get_max_bound() const {
|
||||
return _vmax;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
RectangleEmitter::
|
||||
RectangleEmitter(void) :
|
||||
RectangleEmitter() :
|
||||
BaseParticleEmitter() {
|
||||
_vmin.set(-0.5f, -0.5f);
|
||||
_vmax.set( 0.5f, 0.5f);
|
||||
|
|
@ -48,7 +48,7 @@ RectangleEmitter(const RectangleEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
RectangleEmitter::
|
||||
~RectangleEmitter(void) {
|
||||
~RectangleEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -57,7 +57,7 @@ RectangleEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *RectangleEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new RectangleEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,17 +28,17 @@
|
|||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDAPHYSICS RectangleEmitter : public BaseParticleEmitter {
|
||||
PUBLISHED:
|
||||
RectangleEmitter(void);
|
||||
RectangleEmitter();
|
||||
RectangleEmitter(const RectangleEmitter ©);
|
||||
virtual ~RectangleEmitter(void);
|
||||
virtual ~RectangleEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_min_bound(const LPoint2f& vmin);
|
||||
INLINE void set_max_bound(const LPoint2f& vmax);
|
||||
|
||||
INLINE LPoint2f get_min_bound(void) const;
|
||||
INLINE LPoint2f get_max_bound(void) const;
|
||||
INLINE LPoint2f get_min_bound() const;
|
||||
INLINE LPoint2f get_max_bound() const;
|
||||
|
||||
virtual void output(ostream &out, unsigned int indent=0) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ set_angle(float angle) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE float RingEmitter::
|
||||
get_radius(void) const {
|
||||
get_radius() const {
|
||||
return _radius;
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +56,6 @@ get_radius(void) const {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE float RingEmitter::
|
||||
get_angle(void) const {
|
||||
get_angle() const {
|
||||
return _aoe;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
RingEmitter::
|
||||
RingEmitter(void) :
|
||||
RingEmitter() :
|
||||
_radius(1.0f), _aoe(0.0f) {
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ RingEmitter(const RingEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
RingEmitter::
|
||||
~RingEmitter(void) {
|
||||
~RingEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -58,7 +58,7 @@ RingEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *RingEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new RingEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ private:
|
|||
virtual void assign_initial_velocity(LVector3f& vel);
|
||||
|
||||
PUBLISHED:
|
||||
RingEmitter(void);
|
||||
RingEmitter();
|
||||
RingEmitter(const RingEmitter ©);
|
||||
virtual ~RingEmitter(void);
|
||||
virtual ~RingEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_radius(float r);
|
||||
INLINE void set_angle(float angle);
|
||||
|
||||
INLINE float get_radius(void) const;
|
||||
INLINE float get_angle(void) const;
|
||||
INLINE float get_radius() const;
|
||||
INLINE float get_angle() const;
|
||||
};
|
||||
|
||||
#include "ringEmitter.I"
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ set_death_radius(float radius) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& SparkleParticleRenderer::
|
||||
get_center_color(void) const {
|
||||
get_center_color() const {
|
||||
return _center_color;
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ get_center_color(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const Colorf& SparkleParticleRenderer::
|
||||
get_edge_color(void) const {
|
||||
get_edge_color() const {
|
||||
return _edge_color;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ get_edge_color(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE SparkleParticleRenderer::SparkleParticleLifeScale SparkleParticleRenderer::
|
||||
get_life_scale(void) const {
|
||||
get_life_scale() const {
|
||||
return _life_scale;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ get_life_scale(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SparkleParticleRenderer::
|
||||
get_birth_radius(void) const {
|
||||
get_birth_radius() const {
|
||||
return _birth_radius;
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ get_birth_radius(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SparkleParticleRenderer::
|
||||
get_death_radius(void) const {
|
||||
get_death_radius() const {
|
||||
return _death_radius;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
// Description : Default Constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SparkleParticleRenderer::
|
||||
SparkleParticleRenderer(void) :
|
||||
SparkleParticleRenderer() :
|
||||
BaseParticleRenderer(PR_ALPHA_NONE),
|
||||
_center_color(Colorf(1.0f, 1.0f, 1.0f, 1.0f)),
|
||||
_edge_color(Colorf(1.0f, 1.0f, 1.0f, 1.0f)),
|
||||
|
|
@ -79,7 +79,7 @@ SparkleParticleRenderer(const SparkleParticleRenderer& copy) :
|
|||
// Description : Destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SparkleParticleRenderer::
|
||||
~SparkleParticleRenderer(void) {
|
||||
~SparkleParticleRenderer() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -88,7 +88,7 @@ SparkleParticleRenderer::
|
|||
// Description : child virtual for spawning systems
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleRenderer *SparkleParticleRenderer::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new SparkleParticleRenderer(*this);
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ resize_pool(int new_size) {
|
|||
// Description : initializes the geomnodes
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void SparkleParticleRenderer::
|
||||
init_geoms(void) {
|
||||
init_geoms() {
|
||||
_line_primitive->set_num_prims(0);
|
||||
|
||||
GeomNode *render_node = get_render_node();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PUBLISHED:
|
|||
SP_SCALE
|
||||
};
|
||||
|
||||
SparkleParticleRenderer(void);
|
||||
SparkleParticleRenderer();
|
||||
SparkleParticleRenderer(const SparkleParticleRenderer& copy);
|
||||
SparkleParticleRenderer(const Colorf& center,
|
||||
const Colorf& edge,
|
||||
|
|
@ -52,9 +52,9 @@ PUBLISHED:
|
|||
SparkleParticleLifeScale life_scale,
|
||||
ParticleRendererAlphaMode alpha_mode);
|
||||
|
||||
virtual ~SparkleParticleRenderer(void);
|
||||
virtual ~SparkleParticleRenderer();
|
||||
|
||||
virtual BaseParticleRenderer *make_copy(void);
|
||||
virtual BaseParticleRenderer *make_copy();
|
||||
|
||||
INLINE void set_center_color(const Colorf& c);
|
||||
INLINE void set_edge_color(const Colorf& c);
|
||||
|
|
@ -62,11 +62,11 @@ PUBLISHED:
|
|||
INLINE void set_death_radius(float radius);
|
||||
INLINE void set_life_scale(SparkleParticleLifeScale);
|
||||
|
||||
INLINE const Colorf& get_center_color(void) const;
|
||||
INLINE const Colorf& get_edge_color(void) const;
|
||||
INLINE float get_birth_radius(void) const;
|
||||
INLINE float get_death_radius(void) const;
|
||||
INLINE SparkleParticleLifeScale get_life_scale(void) const;
|
||||
INLINE const Colorf& get_center_color() const;
|
||||
INLINE const Colorf& get_edge_color() const;
|
||||
INLINE float get_birth_radius() const;
|
||||
INLINE float get_death_radius() const;
|
||||
INLINE SparkleParticleLifeScale get_life_scale() const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ private:
|
|||
|
||||
virtual void birth_particle(int index);
|
||||
virtual void kill_particle(int index);
|
||||
virtual void init_geoms(void);
|
||||
virtual void init_geoms();
|
||||
virtual void render(pvector< PT(PhysicsObject) >& po_vector,
|
||||
int ttl_particles);
|
||||
virtual void resize_pool(int new_size);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ set_radius(float r) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
INLINE float SphereSurfaceEmitter::
|
||||
get_radius(void) const {
|
||||
get_radius() const {
|
||||
return _radius;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SphereSurfaceEmitter::
|
||||
SphereSurfaceEmitter(void) {
|
||||
SphereSurfaceEmitter() {
|
||||
_radius = 1.0f;
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ SphereSurfaceEmitter(const SphereSurfaceEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SphereSurfaceEmitter::
|
||||
~SphereSurfaceEmitter(void) {
|
||||
~SphereSurfaceEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -54,7 +54,7 @@ SphereSurfaceEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *SphereSurfaceEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new SphereSurfaceEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ private:
|
|||
virtual void assign_initial_velocity(LVector3f& vel);
|
||||
|
||||
PUBLISHED:
|
||||
SphereSurfaceEmitter(void);
|
||||
SphereSurfaceEmitter();
|
||||
SphereSurfaceEmitter(const SphereSurfaceEmitter ©);
|
||||
virtual ~SphereSurfaceEmitter(void);
|
||||
virtual ~SphereSurfaceEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_radius(float r);
|
||||
INLINE float get_radius(void) const;
|
||||
INLINE float get_radius() const;
|
||||
};
|
||||
|
||||
#include "sphereSurfaceEmitter.I"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SphereVolumeEmitter::
|
||||
SphereVolumeEmitter(void) {
|
||||
SphereVolumeEmitter() {
|
||||
_radius = 1.0f;
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ SphereVolumeEmitter(const SphereVolumeEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
SphereVolumeEmitter::
|
||||
~SphereVolumeEmitter(void) {
|
||||
~SphereVolumeEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -55,7 +55,7 @@ SphereVolumeEmitter::
|
|||
// Description : copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *SphereVolumeEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new SphereVolumeEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ set_alpha_disable(bool ad) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE Texture *SpriteParticleRenderer::
|
||||
get_texture(void) const {
|
||||
get_texture() const {
|
||||
return _sprite_primitive->get_texture();
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ get_ur_uv() const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE Colorf SpriteParticleRenderer::
|
||||
get_color(void) const {
|
||||
get_color() const {
|
||||
return _color;
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ get_color(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool SpriteParticleRenderer::
|
||||
get_x_scale_flag(void) const {
|
||||
get_x_scale_flag() const {
|
||||
return _animate_x_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ get_x_scale_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool SpriteParticleRenderer::
|
||||
get_y_scale_flag(void) const {
|
||||
get_y_scale_flag() const {
|
||||
return _animate_y_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -255,7 +255,7 @@ get_y_scale_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool SpriteParticleRenderer::
|
||||
get_anim_angle_flag(void) const {
|
||||
get_anim_angle_flag() const {
|
||||
return _animate_theta;
|
||||
}
|
||||
|
||||
|
|
@ -264,7 +264,7 @@ get_anim_angle_flag(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SpriteParticleRenderer::
|
||||
get_initial_x_scale(void) const {
|
||||
get_initial_x_scale() const {
|
||||
return _initial_x_texel_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ get_initial_x_scale(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SpriteParticleRenderer::
|
||||
get_final_x_scale(void) const {
|
||||
get_final_x_scale() const {
|
||||
return _final_x_texel_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ get_final_x_scale(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SpriteParticleRenderer::
|
||||
get_initial_y_scale(void) const {
|
||||
get_initial_y_scale() const {
|
||||
return _initial_y_texel_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ get_initial_y_scale(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SpriteParticleRenderer::
|
||||
get_final_y_scale(void) const {
|
||||
get_final_y_scale() const {
|
||||
return _final_y_texel_ratio;
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ get_final_y_scale(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float SpriteParticleRenderer::
|
||||
get_nonanimated_theta(void) const {
|
||||
get_nonanimated_theta() const {
|
||||
return _theta;
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ get_nonanimated_theta(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE BaseParticleRenderer::ParticleRendererBlendMethod SpriteParticleRenderer::
|
||||
get_alpha_blend_method(void) const {
|
||||
get_alpha_blend_method() const {
|
||||
return _blend_method;
|
||||
}
|
||||
|
||||
|
|
@ -318,6 +318,6 @@ get_alpha_blend_method(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool SpriteParticleRenderer::
|
||||
get_alpha_disable(void) const {
|
||||
get_alpha_disable() const {
|
||||
return _sprite_primitive->get_alpha_disable();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ private:
|
|||
|
||||
virtual void birth_particle(int index);
|
||||
virtual void kill_particle(int index);
|
||||
virtual void init_geoms(void);
|
||||
virtual void init_geoms();
|
||||
virtual void render(pvector< PT(PhysicsObject) > &po_vector,
|
||||
int ttl_particles);
|
||||
virtual void resize_pool(int new_size);
|
||||
|
|
@ -82,9 +82,9 @@ private:
|
|||
PUBLISHED:
|
||||
SpriteParticleRenderer(Texture *tex = (Texture *) NULL);
|
||||
SpriteParticleRenderer(const SpriteParticleRenderer ©);
|
||||
virtual ~SpriteParticleRenderer(void);
|
||||
virtual ~SpriteParticleRenderer();
|
||||
|
||||
virtual BaseParticleRenderer *make_copy(void);
|
||||
virtual BaseParticleRenderer *make_copy();
|
||||
|
||||
INLINE SourceType get_source_type() const;
|
||||
|
||||
|
|
@ -105,20 +105,20 @@ PUBLISHED:
|
|||
INLINE void set_alpha_blend_method(ParticleRendererBlendMethod bm);
|
||||
INLINE void set_alpha_disable(bool ad);
|
||||
|
||||
INLINE Texture *get_texture(void) const;
|
||||
INLINE Texture *get_texture() const;
|
||||
INLINE const TexCoordf &get_ll_uv() const;
|
||||
INLINE const TexCoordf &get_ur_uv() const;
|
||||
INLINE Colorf get_color(void) const;
|
||||
INLINE bool get_x_scale_flag(void) const;
|
||||
INLINE bool get_y_scale_flag(void) const;
|
||||
INLINE bool get_anim_angle_flag(void) const;
|
||||
INLINE float get_initial_x_scale(void) const;
|
||||
INLINE float get_final_x_scale(void) const;
|
||||
INLINE float get_initial_y_scale(void) const;
|
||||
INLINE float get_final_y_scale(void) const;
|
||||
INLINE float get_nonanimated_theta(void) const;
|
||||
INLINE ParticleRendererBlendMethod get_alpha_blend_method(void) const;
|
||||
INLINE bool get_alpha_disable(void) const;
|
||||
INLINE Colorf get_color() const;
|
||||
INLINE bool get_x_scale_flag() const;
|
||||
INLINE bool get_y_scale_flag() const;
|
||||
INLINE bool get_anim_angle_flag() const;
|
||||
INLINE float get_initial_x_scale() const;
|
||||
INLINE float get_final_x_scale() const;
|
||||
INLINE float get_initial_y_scale() const;
|
||||
INLINE float get_final_y_scale() const;
|
||||
INLINE float get_nonanimated_theta() const;
|
||||
INLINE ParticleRendererBlendMethod get_alpha_blend_method() const;
|
||||
INLINE bool get_alpha_disable() const;
|
||||
};
|
||||
|
||||
#include "spriteParticleRenderer.I"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TangentRingEmitter::
|
||||
TangentRingEmitter(void) {
|
||||
TangentRingEmitter() {
|
||||
_radius = 1.0f;
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ TangentRingEmitter(const TangentRingEmitter ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TangentRingEmitter::
|
||||
~TangentRingEmitter(void) {
|
||||
~TangentRingEmitter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -54,7 +54,7 @@ TangentRingEmitter::
|
|||
// Description : child copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticleEmitter *TangentRingEmitter::
|
||||
make_copy(void) {
|
||||
make_copy() {
|
||||
return new TangentRingEmitter(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ private:
|
|||
virtual void assign_initial_velocity(LVector3f& vel);
|
||||
|
||||
PUBLISHED:
|
||||
TangentRingEmitter(void);
|
||||
TangentRingEmitter();
|
||||
TangentRingEmitter(const TangentRingEmitter ©);
|
||||
virtual ~TangentRingEmitter(void);
|
||||
virtual ~TangentRingEmitter();
|
||||
|
||||
virtual BaseParticleEmitter *make_copy(void);
|
||||
virtual BaseParticleEmitter *make_copy();
|
||||
|
||||
INLINE void set_radius(float r);
|
||||
INLINE float get_radius(void) const;
|
||||
INLINE float get_radius() const;
|
||||
};
|
||||
|
||||
#include "tangentRingEmitter.I"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ set_initial_angle(float t) {
|
|||
// Description : accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticle::
|
||||
get_initial_angle(void) const {
|
||||
get_initial_angle() const {
|
||||
return _initial_angle;
|
||||
}
|
||||
|
||||
|
|
@ -48,12 +48,12 @@ set_final_angle(float t) {
|
|||
// Description : accessor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticle::
|
||||
get_final_angle(void) const {
|
||||
get_final_angle() const {
|
||||
return _final_angle;
|
||||
}
|
||||
|
||||
INLINE float ZSpinParticle::
|
||||
get_angular_velocity(void) const {
|
||||
get_angular_velocity() const {
|
||||
return _angular_velocity;
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ enable_angular_velocity(bool bEnabled) {
|
|||
}
|
||||
|
||||
INLINE bool ZSpinParticle::
|
||||
get_angular_velocity_enabled(void) const {
|
||||
get_angular_velocity_enabled() const {
|
||||
return _bUseAngularVelocity;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ZSpinParticle::
|
||||
ZSpinParticle(void) :
|
||||
ZSpinParticle() :
|
||||
BaseParticle() {
|
||||
_initial_angle = 0.0f;
|
||||
_final_angle = 0.0f;
|
||||
|
|
@ -54,7 +54,7 @@ ZSpinParticle(const ZSpinParticle ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ZSpinParticle::
|
||||
~ZSpinParticle(void) {
|
||||
~ZSpinParticle() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -63,7 +63,7 @@ ZSpinParticle::
|
|||
// Description : dynamic copier
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PhysicsObject *ZSpinParticle::
|
||||
make_copy(void) const {
|
||||
make_copy() const {
|
||||
return new ZSpinParticle(*this);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ make_copy(void) const {
|
|||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void ZSpinParticle::
|
||||
init(void) {
|
||||
init() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -82,7 +82,7 @@ init(void) {
|
|||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void ZSpinParticle::
|
||||
update(void) {
|
||||
update() {
|
||||
// if using final_angle, want age to range from [0,1] over lifespan, so use parameterized_age
|
||||
// for angular velocity, should be allowed to range freely upward, use regular age
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ update(void) {
|
|||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void ZSpinParticle::
|
||||
die(void) {
|
||||
die() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -119,6 +119,6 @@ die(void) {
|
|||
// Description :
|
||||
////////////////////////////////////////////////////////////////////
|
||||
float ZSpinParticle::
|
||||
get_theta(void) const {
|
||||
get_theta() const {
|
||||
return _cur_angle;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,31 +38,31 @@ private:
|
|||
bool _bUseAngularVelocity;
|
||||
|
||||
public:
|
||||
ZSpinParticle(void);
|
||||
ZSpinParticle();
|
||||
ZSpinParticle(const ZSpinParticle ©);
|
||||
virtual ~ZSpinParticle(void);
|
||||
virtual ~ZSpinParticle();
|
||||
|
||||
virtual PhysicsObject *make_copy(void) const;
|
||||
virtual PhysicsObject *make_copy() const;
|
||||
|
||||
virtual void init(void);
|
||||
virtual void update(void);
|
||||
virtual void die(void);
|
||||
virtual void init();
|
||||
virtual void update();
|
||||
virtual void die();
|
||||
|
||||
virtual float get_theta(void) const;
|
||||
virtual float get_theta() const;
|
||||
|
||||
INLINE void set_initial_angle(float t);
|
||||
INLINE float get_initial_angle(void) const;
|
||||
INLINE float get_initial_angle() const;
|
||||
|
||||
INLINE void set_final_angle(float t);
|
||||
INLINE float get_final_angle(void) const;
|
||||
INLINE float get_final_angle() const;
|
||||
|
||||
// 'set_final_angle' and 'angular_velocity' are mutually exclusive apis
|
||||
// if angular-velocity is specified, final_angle is ignored
|
||||
INLINE void set_angular_velocity(float v);
|
||||
INLINE float get_angular_velocity(void) const;
|
||||
INLINE float get_angular_velocity() const;
|
||||
|
||||
INLINE void enable_angular_velocity(bool bEnabled);
|
||||
INLINE bool get_angular_velocity_enabled(void) const;
|
||||
INLINE bool get_angular_velocity_enabled() const;
|
||||
};
|
||||
|
||||
#include "zSpinParticle.I"
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ set_final_angle_spread(float spread) {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_initial_angle(void) const {
|
||||
get_initial_angle() const {
|
||||
return _initial_angle;
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ get_initial_angle(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_final_angle(void) const {
|
||||
get_final_angle() const {
|
||||
return _final_angle;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ get_final_angle(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_initial_angle_spread(void) const {
|
||||
get_initial_angle_spread() const {
|
||||
return _initial_angle_spread;
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ get_initial_angle_spread(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_final_angle_spread(void) const {
|
||||
get_final_angle_spread() const {
|
||||
return _final_angle_spread;
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ get_final_angle_spread(void) const {
|
|||
// Access : public
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_angular_velocity(void) const {
|
||||
get_angular_velocity() const {
|
||||
return _angular_velocity;
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ set_angular_velocity(float v) {
|
|||
}
|
||||
|
||||
INLINE float ZSpinParticleFactory::
|
||||
get_angular_velocity_spread(void) const {
|
||||
get_angular_velocity_spread() const {
|
||||
return _angular_velocity_spread;
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ enable_angular_velocity(bool bEnabled) {
|
|||
}
|
||||
|
||||
INLINE bool ZSpinParticleFactory::
|
||||
get_angular_velocity_enabled(void) const {
|
||||
get_angular_velocity_enabled() const {
|
||||
return _bUseAngularVelocity;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
// Description : constructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ZSpinParticleFactory::
|
||||
ZSpinParticleFactory(void) :
|
||||
ZSpinParticleFactory() :
|
||||
BaseParticleFactory() {
|
||||
_initial_angle = 0.0f;
|
||||
_final_angle = 0.0f;
|
||||
|
|
@ -59,7 +59,7 @@ ZSpinParticleFactory(const ZSpinParticleFactory ©) :
|
|||
// Description : destructor
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ZSpinParticleFactory::
|
||||
~ZSpinParticleFactory(void) {
|
||||
~ZSpinParticleFactory() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -68,7 +68,7 @@ ZSpinParticleFactory::
|
|||
// Description : factory method
|
||||
////////////////////////////////////////////////////////////////////
|
||||
BaseParticle *ZSpinParticleFactory::
|
||||
alloc_particle(void) const {
|
||||
alloc_particle() const {
|
||||
return new ZSpinParticle;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class EXPCL_PANDAPHYSICS ZSpinParticleFactory :
|
|||
public BaseParticleFactory {
|
||||
private:
|
||||
virtual void populate_child_particle(BaseParticle *bp) const;
|
||||
virtual BaseParticle *alloc_particle(void) const;
|
||||
virtual BaseParticle *alloc_particle() const;
|
||||
|
||||
float _initial_angle,_initial_angle_spread;
|
||||
float _final_angle,_final_angle_spread;
|
||||
|
|
@ -38,28 +38,28 @@ private:
|
|||
|
||||
|
||||
PUBLISHED:
|
||||
ZSpinParticleFactory(void);
|
||||
ZSpinParticleFactory();
|
||||
ZSpinParticleFactory(const ZSpinParticleFactory ©);
|
||||
virtual ~ZSpinParticleFactory(void);
|
||||
virtual ~ZSpinParticleFactory();
|
||||
|
||||
INLINE void set_initial_angle(float angle);
|
||||
INLINE void set_final_angle(float angle);
|
||||
INLINE void set_initial_angle_spread(float spread);
|
||||
INLINE void set_final_angle_spread(float spread);
|
||||
|
||||
INLINE float get_initial_angle(void) const;
|
||||
INLINE float get_final_angle(void) const;
|
||||
INLINE float get_initial_angle_spread(void) const;
|
||||
INLINE float get_final_angle_spread(void) const;
|
||||
INLINE float get_initial_angle() const;
|
||||
INLINE float get_final_angle() const;
|
||||
INLINE float get_initial_angle_spread() const;
|
||||
INLINE float get_final_angle_spread() const;
|
||||
|
||||
INLINE void set_angular_velocity(float v);
|
||||
INLINE float get_angular_velocity(void) const;
|
||||
INLINE float get_angular_velocity() const;
|
||||
|
||||
INLINE void set_angular_velocity_spread(float spread);
|
||||
INLINE float get_angular_velocity_spread(void) const;
|
||||
INLINE float get_angular_velocity_spread() const;
|
||||
|
||||
INLINE void enable_angular_velocity(bool bEnabled);
|
||||
INLINE bool get_angular_velocity_enabled(void) const;
|
||||
INLINE bool get_angular_velocity_enabled() const;
|
||||
};
|
||||
|
||||
#include "zSpinParticleFactory.I"
|
||||
|
|
|
|||
Loading…
Reference in New Issue