- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgParticle::ParticleProcessor Class Reference

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

Inheritance diagram for osgParticle::ParticleProcessor:

[legend]
List of all members.

## Public Types
enum | ReferenceFrame { RELATIVE_RF, ABSOLUTE_RF }
## Public Member Functions
| ParticleProcessor ()
| ParticleProcessor (const ParticleProcessor &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual const char * | libraryName () const
| return the name of the node's library.
virtual const char * | className () const
| return the name of the node's class type.
virtual bool | isSameKindAs (const osg::Object *obj) const
| return true if this and obj are of the same kind of object.
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.
ParticleSystem * | getParticleSystem ()
| Get a pointer to the destination particle system.
const ParticleSystem * | getParticleSystem () const
| Get a const pointer to the destination particle system.
void | setParticleSystem (ParticleSystem *ps)
| Set the destination particle system.
void | setEndless (bool type)
| Set the endless flag of this processor.
bool | isEndless () const
| Check whether this processor is endless.
void | setLifeTime (double t)
| Set the lifetime of this processor.
double | getLifeTime () const
| Get the lifetime of this processor.
void | setStartTime (double t)
| Set the start time of this processor.
double | getStartTime () const
| Get the start time of this processor.
void | setCurrentTime (double t)
| Set the current time of this processor.
double | getCurrentTime () const
| Get the current time of this processor.
void | setResetTime (double t)
| Set the reset time of this processor. A value of 0 disables reset.
double | getResetTime () const
| Get the reset time of this processor.
bool | isAlive () const
| Check whether the processor is alive with respect to start time and life duration.
void | traverse (osg::NodeVisitor &nv)
| Traverse downwards : calls children's accept method with NodeVisitor.
const osg::Matrix & | getLocalToWorldMatrix ()
| Get the current local-to-world transformation matrix (valid only during cull traversal).
const osg::Matrix & | getWorldToLocalMatrix ()
| 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 Member Functions
virtual | ~ParticleProcessor ()
ParticleProcessor & | operator= (const ParticleProcessor &)
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

  | Enumerator:
  RELATIVE_RF |
  ABSOLUTE_RF |

## 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.

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.

double osgParticle::ParticleProcessor::getCurrentTime | ( |  | ) | const`[inline]`

| Get the current time of this processor.

double osgParticle::ParticleProcessor::getLifeTime | ( |  | ) | const`[inline]`

| Get the lifetime of this processor.

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.

double osgParticle::ParticleProcessor::getResetTime | ( |  | ) | const`[inline]`

| Get the reset time of this processor.

double osgParticle::ParticleProcessor::getStartTime | ( |  | ) | const`[inline]`

| Get the start time of this processor.

const osg::Matrix & osgParticle::ParticleProcessor::getWorldToLocalMatrix | ( |  | ) | `[inline]`

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

bool osgParticle::ParticleProcessor::isAlive | ( |  | ) | const`[inline]`

| Check whether the processor is alive with respect to start time and life duration. Note that this method may return true even if the processor has been disabled by calling setEnabled(false). To test whether the processor is actually processing particles or not, you should evaluate (isEnabled() && isAlive()).

bool osgParticle::ParticleProcessor::isEnabled | ( |  | ) | const`[inline]`

| Get whether this processor is enabled or not.

bool osgParticle::ParticleProcessor::isEndless | ( |  | ) | const`[inline]`

| Check whether this processor is endless.

virtual bool osgParticle::ParticleProcessor::isSameKindAs | ( | const osg::Object * | obj | ) | const`[inline, virtual]`

| return true if this and obj are of the same kind of object. Reimplemented from osg::Node. Reimplemented in osgParticle::Emitter, and osgParticle::Program.

virtual const char* osgParticle::ParticleProcessor::libraryName | ( |  | ) | const`[inline, virtual]`

| return the name of the node's library. Reimplemented from osg::Node. 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::setCurrentTime | ( | double | t | ) | `[inline]`

| Set the current time of this processor.

void osgParticle::ParticleProcessor::setEnabled | ( | bool | v | ) | `[inline]`

| Set whether this processor is enabled or not.

void osgParticle::ParticleProcessor::setEndless | ( | bool | type | ) | `[inline]`

| Set the endless flag of this processor.

void osgParticle::ParticleProcessor::setLifeTime | ( | double | t | ) | `[inline]`

| Set the lifetime of this processor.

void osgParticle::ParticleProcessor::setParticleSystem | ( | ParticleSystem * | ps | ) | `[inline]`

| Set the destination particle system.

void osgParticle::ParticleProcessor::setReferenceFrame | ( | ReferenceFrame | rf | ) | `[inline]`

| Set the reference frame.

void osgParticle::ParticleProcessor::setResetTime | ( | double | t | ) | `[inline]`

| Set the reset time of this processor. A value of 0 disables reset.

void osgParticle::ParticleProcessor::setStartTime | ( | double | t | ) | `[inline]`

| Set the start time of this processor.

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 files:

- ParticleProcessor
- ParticleProcessor.cpp