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

An explosion operator exerts force on each particle away from the explosion center. More...

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

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]

Perform some initializations. Do not call this method manually.

Reimplemented from osgParticle::Operator.

References osgParticle::ParticleProcessor::getReferenceFrame(), _xf_center, osgParticle::ParticleProcessor::transformLocalToWorld(), _center, _sigma, _inexp, _outexp, and osg::PI.

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 osgParticle::Particle::getPosition(), _xf_center, osg::Vec3f::length(), _radius, _inexp, _outexp, _magnitude, _epsilon, and osgParticle::Particle::addVelocity().

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 setCenter(), getCenter(), and beginOperate().

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

Referenced by operate(), and beginOperate().

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

Referenced by operate(), and beginOperate().

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

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

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.