OpenSceneGraph
3.0.1
|
A damping operator applies damping constant to particle's velocity. More...
Public Member Functions | |
DampingOperator () | |
DampingOperator (const DampingOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Object (osgParticle, DampingOperator) | |
void | setDamping (float x, float y, float z) |
Set the damping factors. | |
void | setDamping (const osg::Vec3 &damping) |
void | setDamping (float x) |
Set the damping factors to one value. | |
void | getDamping (float &x, float &y, float &z) const |
Get the damping factors. | |
const osg::Vec3 & | getDamping () const |
void | setCutoff (float low, float high) |
Set the velocity cutoff factors. | |
void | setCutoffLow (float low) |
void | setCutoffHigh (float low) |
void | getCutoff (float &low, float &high) const |
Get the velocity cutoff factors. | |
float | getCutoffLow () const |
float | getCutoffHigh () const |
void | operate (Particle *P, double dt) |
Apply the acceleration to a particle. Do not call this method manually. | |
Protected Member Functions | |
virtual | ~DampingOperator () |
DampingOperator & | operator= (const DampingOperator &) |
Protected Attributes | |
osg::Vec3 | _damping |
float | _cutoffLow |
float | _cutoffHigh |
A damping operator applies damping constant to particle's velocity.
Refer to David McAllister's Particle System API (http://www.particlesystems.org)
osgParticle::DampingOperator::DampingOperator | ( | ) | [inline] |
References _damping, and osg::Vec3f::set().
osgParticle::DampingOperator::DampingOperator | ( | const DampingOperator & | copy, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) | [inline] |
virtual osgParticle::DampingOperator::~DampingOperator | ( | ) | [inline, protected, virtual] |
void osgParticle::DampingOperator::getCutoff | ( | float & | low, |
float & | high | ||
) | const [inline] |
Get the velocity cutoff factors.
References _cutoffLow, and _cutoffHigh.
float osgParticle::DampingOperator::getCutoffHigh | ( | ) | const [inline] |
References _cutoffHigh.
float osgParticle::DampingOperator::getCutoffLow | ( | ) | const [inline] |
References _cutoffLow.
void osgParticle::DampingOperator::getDamping | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const [inline] |
Get the damping factors.
References _damping, osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::z().
osgParticle::DampingOperator::META_Object | ( | osgParticle | , |
DampingOperator | |||
) |
void osgParticle::DampingOperator::operate | ( | Particle * | P, |
double | dt | ||
) | [inline, virtual] |
Apply the acceleration to a particle. Do not call this method manually.
Implements osgParticle::Operator.
References osgParticle::Particle::getVelocity(), osg::Vec3f::length2(), _cutoffLow, _cutoffHigh, osg::Vec3f::x(), _damping, osg::Vec3f::y(), osg::Vec3f::z(), and osgParticle::Particle::setVelocity().
DampingOperator& osgParticle::DampingOperator::operator= | ( | const DampingOperator & | ) | [inline, protected] |
void osgParticle::DampingOperator::setCutoff | ( | float | low, |
float | high | ||
) | [inline] |
Set the velocity cutoff factors.
References _cutoffLow, and _cutoffHigh.
void osgParticle::DampingOperator::setCutoffHigh | ( | float | low | ) | [inline] |
References _cutoffHigh.
void osgParticle::DampingOperator::setCutoffLow | ( | float | low | ) | [inline] |
References _cutoffLow.
void osgParticle::DampingOperator::setDamping | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Set the damping factors.
References _damping, and osg::Vec3f::set().
void osgParticle::DampingOperator::setDamping | ( | const osg::Vec3 & | damping | ) | [inline] |
References _damping.
void osgParticle::DampingOperator::setDamping | ( | float | x | ) | [inline] |
Set the damping factors to one value.
References _damping, and osg::Vec3f::set().
float osgParticle::DampingOperator::_cutoffHigh [protected] |
Referenced by setCutoff(), setCutoffHigh(), getCutoff(), getCutoffHigh(), and operate().
float osgParticle::DampingOperator::_cutoffLow [protected] |
Referenced by setCutoff(), setCutoffLow(), getCutoff(), getCutoffLow(), and operate().
osg::Vec3 osgParticle::DampingOperator::_damping [protected] |
Referenced by DampingOperator(), setDamping(), getDamping(), and operate().
![]() | Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5. |