# osgParticle::ModularProgram Class Reference

A program class for performing operations on particles using a sequence of operators. More...

Inheritance diagram for osgParticle::ModularProgram:

[legend]
List of all members.

## Public Member Functions

| ModularProgram ()
| ModularProgram (const ModularProgram &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Node (osgParticle, ModularProgram)
int | numOperators () const
| Get the number of operators.
void | addOperator (Operator *o)
| Add an operator to the list.
Operator * | getOperator (int i)
| Get a pointer to an operator in the list.
const Operator * | getOperator (int i) const
| Get a const pointer to an operator in the list.
void | removeOperator (int i)
| Remove an operator from the list.

## Protected Member Functions

virtual | ~ModularProgram ()
ModularProgram & | operator= (const ModularProgram &)
void | execute (double dt)
| Execute the program on the particle system. Must be overriden in descendant classes.

## Detailed Description

A program class for performing operations on particles using a sequence of operators.

To use a `ModularProgram` you have to create some `Operator` objects and add them to the program. All operators will be applied to each particle in the same order they've been added to the program.

## Constructor & Destructor Documentation

osgParticle::ModularProgram::ModularProgram | ( |  | ) |

osgParticle::ModularProgram::ModularProgram | ( | const ModularProgram & | copy,
|  | const osg::CopyOp & | copyop = `osg::CopyOp::SHALLOW_COPY`
| ) |

virtual osgParticle::ModularProgram::~ModularProgram | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

void osgParticle::ModularProgram::addOperator | ( | Operator * | o | ) | `[inline]`

| Add an operator to the list.

void osgParticle::ModularProgram::execute | ( | double | dt | ) | `[protected, virtual]`

| Execute the program on the particle system. Must be overriden in descendant classes. Implements osgParticle::Program.

const Operator * osgParticle::ModularProgram::getOperator | ( | int | i | ) | const`[inline]`

| Get a const pointer to an operator in the list.

Operator * osgParticle::ModularProgram::getOperator | ( | int | i | ) | `[inline]`

| Get a pointer to an operator in the list.

osgParticle::ModularProgram::META_Node | ( | osgParticle | ,
|  | ModularProgram |
| ) |

int osgParticle::ModularProgram::numOperators | ( |  | ) | const`[inline]`

| Get the number of operators.

ModularProgram& osgParticle::ModularProgram::operator= | ( | const ModularProgram & |  | ) | `[inline, protected]`

void osgParticle::ModularProgram::removeOperator | ( | int | i | ) | `[inline]`

| Remove an operator from the list.

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

- ModularProgram
- ModularProgram.cpp