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

osgParticle::AccelOperator Class Reference

An operator class that applies a constant acceleration to the particles. More...

Inheritance diagram for osgParticle::AccelOperator:

Inheritance graph
[legend]
List of all members.

Public Methods

 AccelOperator ()
 AccelOperator (const AccelOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgParticle, AccelOperator)
const osg::Vec3 & getAcceleration () const
 Get the acceleration vector.

void setAcceleration (const osg::Vec3 &v)
 Set the acceleration vector.

void setToGravity (float scale=1)
 Quickly set the acceleration vector to the gravity on earth (0, 0, -9.81).

void operate (Particle *P, double dt)
 Apply the acceleration to a particle. Do not call this method manually.

void beginOperate (Program *prg)
 Perform some initializations. Do not call this method manually.


Protected Methods

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

Detailed Description

An operator class that applies a constant acceleration to the particles.


Constructor & Destructor Documentation

osgParticle::AccelOperator::AccelOperator (    )  [inline]
 

osgParticle::AccelOperator::AccelOperator (  const AccelOperator &    copy,
const osg::CopyOp &    copyop = osg::CopyOp::SHALLOW_COPY
)  [inline]
 

virtual osgParticle::AccelOperator::~AccelOperator (    )  [inline, protected, virtual]
 


Member Function Documentation

void osgParticle::AccelOperator::beginOperate (  Program *    prg )  [inline, virtual]
 

Perform some initializations. Do not call this method manually.

Reimplemented from osgParticle::Operator.

const osg::Vec3 & osgParticle::AccelOperator::getAcceleration (    )  const [inline]
 

Get the acceleration vector.

osgParticle::AccelOperator::META_Object (  osgParticle   ,
AccelOperator   
) 
 

void osgParticle::AccelOperator::operate (  Particle *    P,
double    dt
)  [inline, virtual]
 

Apply the acceleration to a particle. Do not call this method manually.

Implements osgParticle::Operator.

AccelOperator& osgParticle::AccelOperator::operator= (  const AccelOperator &    )  [inline, protected]
 

void osgParticle::AccelOperator::setAcceleration (  const osg::Vec3 &    v )  [inline]
 

Set the acceleration vector.

void osgParticle::AccelOperator::setToGravity (  float    scale = 1 )  [inline]
 

Quickly set the acceleration vector to the gravity on earth (0, 0, -9.81).

The acceleration will be multiplied by the scale parameter.


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