## class osgParticle::Operator

> An abstract base class used by `ModularProgram` to perform operations on particles before they are updated.

## Inheritance:

### Public Methods

virtual const char* libraryName() const
virtual const char* className() const
virtual bool isSameKindAs(const osg::Object* obj) const
virtual void operate(Particle* P, double dt) = 0
  Do something on a particle.
virtual void beginOperate(Program* )
  Do something before processing particles via the `operate()` method.
virtual void endOperate()
  Do something after all particles have been processed
inline Operator()
inline Operator(const Operator &copy, const osg::CopyOp &copyop)
inline bool isEnabled() const
  Get whether this operator is enabled
inline void setEnabled(bool v)
  Enable or disable this operator

### Protected Methods

virtual ~Operator()
Operator& operator=(const Operator &)

## Documentation

> An abstract base class used by `ModularProgram` to perform operations on particles before they are updated. To implement a new operator, derive from this class and override the `operate()` method. You should also override the `beginOperate()` method to query the calling program for the reference frame used, and initialize the right transformations if needed.

`virtual const char* libraryName() const`

`virtual const char* className() const`

`virtual bool isSameKindAs(const osg::Object* obj) const`

`virtual void operate(Particle* P, double dt) = 0`
  Do something on a particle. This method is called by `ModularProgram` objects to perform some operations on the particles. You must override it in descendant classes. Common operations consist of modifying the particle's velocity vector. The `dt` parameter is the time elapsed from last operation.

`virtual void beginOperate(Program* )`
  Do something before processing particles via the `operate()` method. Overriding this method could be necessary to query the calling `Program` object for the current reference frame. If the reference frame is RELATIVE_TO_PARENTS, then your class should prepare itself to do all operations in local coordinates.

`virtual void endOperate()`
  Do something after all particles have been processed

`virtual ~Operator()`

`Operator& operator=(const Operator &)`

`inline Operator()`

`inline Operator(const Operator &copy, const osg::CopyOp &copyop)`

`inline bool isEnabled() const`
  Get whether this operator is enabled

`inline void setEnabled(bool v)`
  Enable or disable this operator

Direct child classes:
  ForceOperator
  FluidFrictionOperator
  AngularAccelOperator
  AccelOperator

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.