An operator that applies a constant force to the particles. More...
Public Member Functions | |
ForceOperator () | |
ForceOperator (const ForceOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Object (osgParticle, ForceOperator) | |
const osg::Vec3 & | getForce () const |
Get the force vector. | |
void | setForce (const osg::Vec3 &f) |
Set the force vector. | |
void | operate (Particle *P, double dt) |
Apply the force to a particle. Do not call this method manually. | |
void | beginOperate (Program *prg) |
Perform some initialization. Do not call this method manually. | |
Protected Member Functions | |
virtual | ~ForceOperator () |
ForceOperator & | operator= (const ForceOperator &) |
disallow any copy operator. |
An operator that applies a constant force to the particles.
Remember that if the mass of particles is expressed in kg and the lengths are expressed in meters, then the force should be expressed in Newtons.
osgParticle::ForceOperator::ForceOperator | ( | ) | [inline] |
osgParticle::ForceOperator::ForceOperator | ( | const ForceOperator & | copy, | |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY | |||
) | [inline] |
virtual osgParticle::ForceOperator::~ForceOperator | ( | ) | [inline, protected, virtual] |
void osgParticle::ForceOperator::beginOperate | ( | Program * | prg | ) | [inline, virtual] |
Perform some initialization. Do not call this method manually.
Reimplemented from osgParticle::Operator.
References osgParticle::ParticleProcessor::getReferenceFrame(), osgParticle::ParticleProcessor::RELATIVE_RF, and osgParticle::ParticleProcessor::rotateLocalToWorld().
const osg::Vec3 & osgParticle::ForceOperator::getForce | ( | ) | const [inline] |
Get the force vector.
osgParticle::ForceOperator::META_Object | ( | osgParticle | , | |
ForceOperator | ||||
) |
void osgParticle::ForceOperator::operate | ( | Particle * | P, | |
double | dt | |||
) | [inline, virtual] |
Apply the force to a particle. Do not call this method manually.
Implements osgParticle::Operator.
References osgParticle::Particle::addVelocity(), and osgParticle::Particle::getMassInv().
ForceOperator& osgParticle::ForceOperator::operator= | ( | const ForceOperator & | ) | [inline, protected] |
disallow any copy operator.
Reimplemented from osgParticle::Operator.
void osgParticle::ForceOperator::setForce | ( | const osg::Vec3 & | f | ) | [inline] |
Set the force vector.
![]() | Generated at Tue Jul 20 05:46:43 2010 for the OpenSceneGraph by doxygen 1.6.1. |