OpenSceneGraph  3.0.1
Public Member Functions | Protected Member Functions | Protected Attributes
osgParticle::OrbitOperator Class Reference

An orbit operator forces particles in the orbit around a point. More...

Inheritance diagram for osgParticle::OrbitOperator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 OrbitOperator ()
 OrbitOperator (const OrbitOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgParticle, OrbitOperator)
void setCenter (const osg::Vec3 &c)
 Set the center of orbit.
const osg::Vec3getCenter () 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 ()
OrbitOperatoroperator= (const OrbitOperator &)

Protected Attributes

osg::Vec3 _center
osg::Vec3 _xf_center
float _magnitude
float _epsilon
float _maxRadius

Detailed Description

An orbit operator forces particles in the orbit around a point.

Refer to David McAllister's Particle System API (http://www.particlesystems.org)


Constructor & Destructor Documentation

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]

Member Function Documentation

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.


Member Data Documentation

Referenced by setCenter(), getCenter(), and beginOperate().

Referenced by setEpsilon(), getEpsilon(), and operate().

Referenced by setMagnitude(), getMagnitude(), and operate().

Referenced by setMaxRadius(), getMaxRadius(), and operate().

Referenced by operate(), and beginOperate().


The documentation for this class was generated from the following file:

osg logo
Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5.