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 _center, _xf_center, osgParticle::ParticleProcessor::getReferenceFrame(), osgParticle::ParticleProcessor::RELATIVE_RF, and osgParticle::ParticleProcessor::transformLocalToWorld().
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 _epsilon, _magnitude, _maxRadius, _xf_center, osgParticle::Particle::addVelocity(), osgParticle::Particle::getPosition(), and osg::Vec3f::length().
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 beginOperate(), getCenter(), and setCenter().
float osgParticle::OrbitOperator::_epsilon [protected] |
Referenced by getEpsilon(), operate(), and setEpsilon().
float osgParticle::OrbitOperator::_magnitude [protected] |
Referenced by getMagnitude(), operate(), and setMagnitude().
float osgParticle::OrbitOperator::_maxRadius [protected] |
Referenced by getMaxRadius(), operate(), and setMaxRadius().
osg::Vec3 osgParticle::OrbitOperator::_xf_center [protected] |
Referenced by beginOperate(), and operate().
![]() | Generated at Mon May 7 2012 07:18:35 for the OpenSceneGraph by doxygen 1.8.0. |