openscenegraph
Public Member Functions | Protected Member Functions | Protected Attributes
osgParticle::ExplosionOperator Class Reference
Inheritance diagram for osgParticle::ExplosionOperator:
osgParticle::Operator osg::Object osg::Referenced

List of all members.

Public Member Functions

 ExplosionOperator ()
 ExplosionOperator (const ExplosionOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgParticle, ExplosionOperator)
void setCenter (const osg::Vec3 &c)
 Set the center of shock wave.
const osg::Vec3getCenter () const
 Get the center of shock wave.
void setRadius (float r)
 Set the radius of wave peak.
float getRadius () const
 Get the radius of wave peak.
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 setSigma (float s)
 Set broadness of the strength of the wave.
float getSigma () const
 Get broadness of the strength of the wave.
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 ~ExplosionOperator ()
ExplosionOperatoroperator= (const ExplosionOperator &)

Protected Attributes

osg::Vec3 _center
osg::Vec3 _xf_center
float _radius
float _magnitude
float _epsilon
float _sigma
float _inexp
float _outexp

Detailed Description

An explosion operator exerts force on each particle away from the explosion center. Refer to David McAllister's Particle System API (http://www.particlesystems.org)


Constructor & Destructor Documentation

osgParticle::ExplosionOperator::ExplosionOperator ( ) [inline]
osgParticle::ExplosionOperator::ExplosionOperator ( const ExplosionOperator copy,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
) [inline]
virtual osgParticle::ExplosionOperator::~ExplosionOperator ( ) [inline, protected, virtual]

Member Function Documentation

void osgParticle::ExplosionOperator::beginOperate ( Program prg) [inline, virtual]
const osg::Vec3& osgParticle::ExplosionOperator::getCenter ( ) const [inline]

Get the center of shock wave.

References _center.

float osgParticle::ExplosionOperator::getEpsilon ( ) const [inline]

Get the acceleration epsilon.

References _epsilon.

float osgParticle::ExplosionOperator::getMagnitude ( ) const [inline]

Get the acceleration scale.

References _magnitude.

float osgParticle::ExplosionOperator::getRadius ( ) const [inline]

Get the radius of wave peak.

References _radius.

float osgParticle::ExplosionOperator::getSigma ( ) const [inline]

Get broadness of the strength of the wave.

References _sigma.

osgParticle::ExplosionOperator::META_Object ( osgParticle  ,
ExplosionOperator   
)
void osgParticle::ExplosionOperator::operate ( Particle P,
double  dt 
) [inline, virtual]

Apply the acceleration to a particle. Do not call this method manually.

Implements osgParticle::Operator.

References _epsilon, _inexp, _magnitude, _outexp, _radius, _xf_center, osgParticle::Particle::addVelocity(), osgParticle::Particle::getPosition(), and osg::Vec3f::length().

ExplosionOperator& osgParticle::ExplosionOperator::operator= ( const ExplosionOperator ) [inline, protected]
void osgParticle::ExplosionOperator::setCenter ( const osg::Vec3 c) [inline]

Set the center of shock wave.

References _center.

void osgParticle::ExplosionOperator::setEpsilon ( float  eps) [inline]

Set the acceleration epsilon.

References _epsilon.

void osgParticle::ExplosionOperator::setMagnitude ( float  mag) [inline]

Set the acceleration scale.

References _magnitude.

void osgParticle::ExplosionOperator::setRadius ( float  r) [inline]

Set the radius of wave peak.

References _radius.

void osgParticle::ExplosionOperator::setSigma ( float  s) [inline]

Set broadness of the strength of the wave.

References _sigma.


Member Data Documentation

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

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

Referenced by beginOperate(), and operate().

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

Referenced by beginOperate(), and operate().

Referenced by getRadius(), operate(), and setRadius().

Referenced by beginOperate(), getSigma(), and setSigma().

Referenced by beginOperate(), and operate().


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