Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgParticle::ParticleProcessor Class Reference

A common base interface for those classes which need to do something on particles. More...

Inheritance diagram for osgParticle::ParticleProcessor:

Inheritance graph
[legend]
List of all members.

Public Types

enum  ReferenceFrame { RELATIVE_TO_PARENTS, RELATIVE_TO_ABSOLUTE }

Public Methods

 ParticleProcessor ()
 ParticleProcessor (const ParticleProcessor &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual const char * className () const
 return the name of the node's class type.

virtual bool isSameKindAs (const osg::Object *obj) const
virtual void accept (osg::NodeVisitor &nv)
 Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.

ReferenceFrame getReferenceFrame () const
 Get the reference frame.

void setReferenceFrame (ReferenceFrame rf)
 Set the reference frame.

bool isEnabled () const
 Get whether this processor is enabled or not.

void setEnabled (bool v)
 Set whether this processor is enabled or not.

ParticleSystemgetParticleSystem ()
 Get a pointer to the destination particle system.

const ParticleSystemgetParticleSystem () const
 Get a const pointer to the destination particle system.

void setParticleSystem (ParticleSystem *ps)
 Set the destination particle system.

void traverse (osg::NodeVisitor &nv)
 Traverse downwards : calls children's accept method with NodeVisitor.

const osg::MatrixgetLocalToWorldMatrix ()
 Get the current local-to-world transformation matrix (valid only during cull traversal).

const osg::MatrixgetWorldToLocalMatrix ()
 Get the current world-to-local transformation matrix (valid only during cull traversal).

osg::Vec3 transformLocalToWorld (const osg::Vec3 &P)
 Transform a point from local to world coordinates (valid only during cull traversal).

osg::Vec3 rotateLocalToWorld (const osg::Vec3 &P)
 Transform a vector from local to world coordinates, discarding translation (valid only during cull traversal).

osg::Vec3 transformWorldToLocal (const osg::Vec3 &P)
 Transform a point from world to local coordinates (valid only during cull traversal).

osg::Vec3 rotateWorldToLocal (const osg::Vec3 &P)
 Transform a vector from world to local coordinates, discarding translation (valid only during cull traversal).


Protected Methods

virtual ~ParticleProcessor ()
ParticleProcessor & operator= (const ParticleProcessor &)
const bool computeBound () const
 Compute the bounding sphere around Node's geometry or children.

virtual void process (double dt)=0

Detailed Description

A common base interface for those classes which need to do something on particles.

Such classes are, for example, Emitter (particle generation) and Program (particle animation). This class holds some properties, like a reference frame and a reference to a ParticleSystem; descendant classes should process the particles taking into account the reference frame, computing the right transformations when needed.


Member Enumeration Documentation

enum osgParticle::ParticleProcessor::ReferenceFrame
 

Enumeration values:
RELATIVE_TO_PARENTS 
RELATIVE_TO_ABSOLUTE 


Constructor & Destructor Documentation

osgParticle::ParticleProcessor::ParticleProcessor  
 

osgParticle::ParticleProcessor::ParticleProcessor const ParticleProcessor &    copy,
const osg::CopyOp   copyop = osg::CopyOp::SHALLOW_COPY
 

virtual osgParticle::ParticleProcessor::~ParticleProcessor   [inline, protected, virtual]
 


Member Function Documentation

virtual void osgParticle::ParticleProcessor::accept osg::NodeVisitor   nv [inline, virtual]
 

Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.

Reimplemented from osg::Node.

Reimplemented in osgParticle::Emitter, and osgParticle::Program.

virtual const char* osgParticle::ParticleProcessor::className   const [inline, virtual]
 

return the name of the node's class type.

Reimplemented from osg::Node.

Reimplemented in osgParticle::Emitter, and osgParticle::Program.

const bool osgParticle::ParticleProcessor::computeBound   const [inline, protected, virtual]
 

Compute the bounding sphere around Node's geometry or children.

This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().

Reimplemented from osg::Node.

const osg::Matrix & osgParticle::ParticleProcessor::getLocalToWorldMatrix   [inline]
 

Get the current local-to-world transformation matrix (valid only during cull traversal).

const ParticleSystem * osgParticle::ParticleProcessor::getParticleSystem   const [inline]
 

Get a const pointer to the destination particle system.

ParticleSystem * osgParticle::ParticleProcessor::getParticleSystem   [inline]
 

Get a pointer to the destination particle system.

ParticleProcessor::ReferenceFrame osgParticle::ParticleProcessor::getReferenceFrame   const [inline]
 

Get the reference frame.

const osg::Matrix & osgParticle::ParticleProcessor::getWorldToLocalMatrix   [inline]
 

Get the current world-to-local transformation matrix (valid only during cull traversal).

bool osgParticle::ParticleProcessor::isEnabled   const [inline]
 

Get whether this processor is enabled or not.

virtual bool osgParticle::ParticleProcessor::isSameKindAs const osg::Object   obj const [inline, virtual]
 

Reimplemented in osgParticle::Emitter, and osgParticle::Program.

ParticleProcessor& osgParticle::ParticleProcessor::operator= const ParticleProcessor &    [inline, protected]
 

virtual void osgParticle::ParticleProcessor::process double    dt [protected, pure virtual]
 

Implemented in osgParticle::Emitter, and osgParticle::Program.

osg::Vec3 osgParticle::ParticleProcessor::rotateLocalToWorld const osg::Vec3   P [inline]
 

Transform a vector from local to world coordinates, discarding translation (valid only during cull traversal).

osg::Vec3 osgParticle::ParticleProcessor::rotateWorldToLocal const osg::Vec3   P [inline]
 

Transform a vector from world to local coordinates, discarding translation (valid only during cull traversal).

void osgParticle::ParticleProcessor::setEnabled bool    v [inline]
 

Set whether this processor is enabled or not.

void osgParticle::ParticleProcessor::setParticleSystem ParticleSystem   ps [inline]
 

Set the destination particle system.

void osgParticle::ParticleProcessor::setReferenceFrame ReferenceFrame    rf [inline]
 

Set the reference frame.

osg::Vec3 osgParticle::ParticleProcessor::transformLocalToWorld const osg::Vec3   P [inline]
 

Transform a point from local to world coordinates (valid only during cull traversal).

osg::Vec3 osgParticle::ParticleProcessor::transformWorldToLocal const osg::Vec3   P [inline]
 

Transform a point from world to local coordinates (valid only during cull traversal).

void osgParticle::ParticleProcessor::traverse osg::NodeVisitor   nv [virtual]
 

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Node.


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:53 2002 for the Open Scene Graph by doxygen 1.2.16.