OpenSceneGraph
3.0.1
|
An orbit operator forces particles in the orbit around a point. More...
Public Member Functions | |
OrbitOperator () | |
OrbitOperator (const OrbitOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Object (osgParticle, OrbitOperator) | |
void | setCenter (const osg::Vec3 &c) |
Set the center of orbit. | |
const osg::Vec3 & | getCenter () const |
Get the center of orbit. | |
void | setMagnitude (float mag) |
Set the acceleration scale. | |
float | getMagnitude () const |
Get the acceleration scale. | |
void | setEpsilon (float eps) |
Set the acceleration epsilon. | |
float | getEpsilon () const |
Get the acceleration epsilon. | |
void | setMaxRadius (float max) |
Set max radius between the center and the particle. | |
float | getMaxRadius () const |
Get max radius between the center and the particle. | |
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 Member Functions | |
virtual | ~OrbitOperator () |
OrbitOperator & | operator= (const OrbitOperator &) |
Protected Attributes | |
osg::Vec3 | _center |
osg::Vec3 | _xf_center |
float | _magnitude |
float | _epsilon |
float | _maxRadius |
An orbit operator forces particles in the orbit around a point.
Refer to David McAllister's Particle System API (http://www.particlesystems.org)
osgParticle::OrbitOperator::OrbitOperator | ( | ) | [inline] |
osgParticle::OrbitOperator::OrbitOperator | ( | const OrbitOperator & | copy, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) | [inline] |
virtual osgParticle::OrbitOperator::~OrbitOperator | ( | ) | [inline, protected, virtual] |
void osgParticle::OrbitOperator::beginOperate | ( | Program * | prg | ) | [inline, virtual] |
Perform some initializations. Do not call this method manually.
Reimplemented from osgParticle::Operator.
References osgParticle::ParticleProcessor::getReferenceFrame(), _xf_center, osgParticle::ParticleProcessor::transformLocalToWorld(), and _center.
const osg::Vec3& osgParticle::OrbitOperator::getCenter | ( | ) | const [inline] |
Get the center of orbit.
References _center.
float osgParticle::OrbitOperator::getEpsilon | ( | ) | const [inline] |
Get the acceleration epsilon.
References _epsilon.
float osgParticle::OrbitOperator::getMagnitude | ( | ) | const [inline] |
Get the acceleration scale.
References _magnitude.
float osgParticle::OrbitOperator::getMaxRadius | ( | ) | const [inline] |
Get max radius between the center and the particle.
References _maxRadius.
osgParticle::OrbitOperator::META_Object | ( | osgParticle | , |
OrbitOperator | |||
) |
void osgParticle::OrbitOperator::operate | ( | Particle * | P, |
double | dt | ||
) | [inline, virtual] |
Apply the acceleration to a particle. Do not call this method manually.
Implements osgParticle::Operator.
References _xf_center, osgParticle::Particle::getPosition(), osg::Vec3f::length(), _maxRadius, osgParticle::Particle::addVelocity(), _magnitude, and _epsilon.
OrbitOperator& osgParticle::OrbitOperator::operator= | ( | const OrbitOperator & | ) | [inline, protected] |
void osgParticle::OrbitOperator::setCenter | ( | const osg::Vec3 & | c | ) | [inline] |
Set the center of orbit.
References _center.
void osgParticle::OrbitOperator::setEpsilon | ( | float | eps | ) | [inline] |
Set the acceleration epsilon.
References _epsilon.
void osgParticle::OrbitOperator::setMagnitude | ( | float | mag | ) | [inline] |
Set the acceleration scale.
References _magnitude.
void osgParticle::OrbitOperator::setMaxRadius | ( | float | max | ) | [inline] |
Set max radius between the center and the particle.
References _maxRadius.
osg::Vec3 osgParticle::OrbitOperator::_center [protected] |
Referenced by setCenter(), getCenter(), and beginOperate().
float osgParticle::OrbitOperator::_epsilon [protected] |
Referenced by setEpsilon(), getEpsilon(), and operate().
float osgParticle::OrbitOperator::_magnitude [protected] |
Referenced by setMagnitude(), getMagnitude(), and operate().
float osgParticle::OrbitOperator::_maxRadius [protected] |
Referenced by setMaxRadius(), getMaxRadius(), and operate().
osg::Vec3 osgParticle::OrbitOperator::_xf_center [protected] |
Referenced by operate(), and beginOperate().
![]() | Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5. |