Panda3D
Public Types | Public Member Functions | Friends | List of all members
BaseParticleRenderer Class Referenceabstract

Pure virtual particle renderer base class. More...

#include "baseParticleRenderer.h"

Inheritance diagram for BaseParticleRenderer:
ReferenceCount MemoryBase GeomParticleRenderer LineParticleRenderer PointParticleRenderer SparkleParticleRenderer SpriteParticleRenderer

Public Types

enum  ParticleRendererAlphaMode {
  PR_ALPHA_NONE, PR_ALPHA_OUT, PR_ALPHA_IN, PR_ALPHA_IN_OUT,
  PR_ALPHA_USER, PR_NOT_INITIALIZED_YET
}
 
enum  ParticleRendererBlendMethod { PP_NO_BLEND, PP_BLEND_LINEAR, PP_BLEND_CUBIC }
 

Public Member Functions

virtual ~BaseParticleRenderer ()
 Destructor. More...
 
ParticleRendererAlphaMode get_alpha_mode () const
 
bool get_ignore_scale () const
 Returns the "ignore scale" flag. More...
 
GeomNodeget_render_node () const
 Query the geomnode pointer. More...
 
NodePath get_render_node_path () const
 Query the geomnode pointer. More...
 
PN_stdfloat get_user_alpha () const
 gets alpha for "user" alpha mode More...
 
virtual BaseParticleRenderermake_copy ()=0
 
virtual void output (std::ostream &out) const
 Write a string representation of this instance to <out>. More...
 
void set_alpha_mode (ParticleRendererAlphaMode am)
 
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 More...
 
void set_ignore_scale (bool ignore_scale)
 Sets the "ignore scale" flag. More...
 
void set_user_alpha (PN_stdfloat ua)
 sets alpha for "user" alpha mode More...
 
virtual void write (std::ostream &out, int indent=0) const
 Write a string representation of this instance to <out>. More...
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Friends

class ParticleSystem
 

Additional Inherited Members

- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Detailed Description

Pure virtual particle renderer base class.

Definition at line 32 of file baseParticleRenderer.h.

Constructor & Destructor Documentation

◆ ~BaseParticleRenderer()

BaseParticleRenderer::~BaseParticleRenderer ( )
virtual

Destructor.

Definition at line 55 of file baseParticleRenderer.cxx.

Member Function Documentation

◆ get_ignore_scale()

bool BaseParticleRenderer::get_ignore_scale ( ) const
inline

Returns the "ignore scale" flag.

See set_ignore_scale().

Definition at line 83 of file baseParticleRenderer.I.

◆ get_render_node()

GeomNode * BaseParticleRenderer::get_render_node ( ) const
inline

Query the geomnode pointer.

Definition at line 18 of file baseParticleRenderer.I.

Referenced by SpriteParticleRenderer::~SpriteParticleRenderer().

◆ get_render_node_path()

NodePath BaseParticleRenderer::get_render_node_path ( ) const
inline

Query the geomnode pointer.

Definition at line 26 of file baseParticleRenderer.I.

◆ get_user_alpha()

PN_stdfloat BaseParticleRenderer::get_user_alpha ( ) const
inline

gets alpha for "user" alpha mode

Definition at line 59 of file baseParticleRenderer.I.

◆ output()

void BaseParticleRenderer::output ( std::ostream &  out) const
virtual

Write a string representation of this instance to <out>.

Reimplemented in SpriteParticleRenderer, SparkleParticleRenderer, PointParticleRenderer, GeomParticleRenderer, and LineParticleRenderer.

Definition at line 82 of file baseParticleRenderer.cxx.

◆ set_color_blend_mode()

void BaseParticleRenderer::set_color_blend_mode ( ColorBlendAttrib::Mode  bm,
ColorBlendAttrib::Operand  oa = ColorBlendAttrib::O_zero,
ColorBlendAttrib::Operand  ob = ColorBlendAttrib::O_zero 
)
inline

sets the ColorBlendAttrib on the _render_node

Definition at line 67 of file baseParticleRenderer.I.

◆ set_ignore_scale()

void BaseParticleRenderer::set_ignore_scale ( bool  ignore_scale)

Sets the "ignore scale" flag.

When this is true, particles will be drawn as if they had no scale, regardless of whatever scale might be inherited from above the render node in the scene graph.

This flag is mainly useful to support legacy code that was written for a very early version of Panda, whose sprite particle renderer had a bug that incorrectly ignored the inherited scale.

Definition at line 68 of file baseParticleRenderer.cxx.

◆ set_user_alpha()

void BaseParticleRenderer::set_user_alpha ( PN_stdfloat  ua)
inline

sets alpha for "user" alpha mode

Definition at line 51 of file baseParticleRenderer.I.

◆ write()

void BaseParticleRenderer::write ( std::ostream &  out,
int  indent = 0 
) const
virtual

The documentation for this class was generated from the following files: