VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
makVrv::DtParticleEffect Class Referenceabstract

This class provides a facade around the osgParticle class hierarchy. More...

Inheritance diagram for makVrv::DtParticleEffect:
Inheritance graph
[legend]

Classes

struct  DefaultParticleParameters
 

Public Member Functions

 DtParticleEffect ()
 CTOR. More...
 

osg::Group contract functions

Get the name of the object's library/namespace

typedef boost::unordered_map
< osgParticle::ParticleSystem
*, DefaultParticleParameters
ParticleParametersMap
 
osg::ref_ptr< osg::Group > myEmitterGroup
 
osg::ref_ptr< osg::Group > myProgramGroup
 
osg::ref_ptr< osg::Geode > myParticleSystemGeode
 
osg::ref_ptr< osg::Group > myProxyGroup
 
osg::ref_ptr< osg::Group > myTransformGroup
 
std::vector< osg::ref_ptr
< osg::Sequence > > 
mySequences
 
bool mySequencesLooping
 
bool mySequencesReverse
 
osg::ref_ptr
< osg::MatrixTransform > 
myParticleSystemTransform
 
bool myTransformsSet
 
bool myUseLocalParticleSystem
 
osg::Vec3 myPosition
 
float myScale
 
float myIntensity
 
double myStartTime
 
double myEmitterDuration
 
int myMaxParticlesToEmit
 
osg::Vec3 myWind
 
osg::Vec3 myUp
 
float myGroundDist
 
bool myIsRotorWash
 
float myRotorDiameter
 
float myRotorWindSpeed
 
ParticleParametersMap myDefaultParticleParameters
 
virtual const charlibraryName () const
 
virtual const charclassName () const
 Get the name of the object's class. More...
 
virtual bool isSameKindAs (const osg::Object *obj) const
 Test for type sameness. More...
 
virtual void accept (osg::NodeVisitor &v)
 
virtual osg::Group * emitterGroup ()
 Get an osg Group containing the emitters for this effect. More...
 
virtual osg::Group * programGroup ()
 Get an osg Group containing the programs for this effect. More...
 
virtual osg::Group * proxyGroup ()
 Get an osg Group containing the effect's proxy nodes. More...
 
virtual osg::Group * transformGroup ()
 Get an osg Group containing transforms placed at the top of the effect. More...
 
virtual void setUpEmittersAndPrograms ()=0
 Set the emitter group and program group appropriately. More...
 
virtual void buildEffect ()
 Build the effect up from its current state. More...
 
virtual bool useLocalParticleSystem ()
 Get a previously set useLocalParticleSystem flag. More...
 
virtual void setUseLocalParticleSystem (bool b)
 Included for possible future use. More...
 
virtual float scale () const
 Get the current particle system scale factor. More...
 
virtual void setScale (float scale)
 Scale the particle system by the specified value. More...
 
virtual float intensity ()
 Get a previously set intensity. More...
 
virtual void setIntensity (float intensity)
 Included for possible future use. More...
 
virtual double startTime ()
 Get the start time of the particle effect. More...
 
virtual void setStartTime (double startTime)
 Set the start time of the particle effect. More...
 
virtual double emitterDuration ()
 Get the emitter duration previously set. More...
 
virtual void setEmitterDuration (double emitterDuration)
 Set the emitter duration. More...
 
virtual double particleLifetime ()
 Find the maximum lifetime of any future particle in any of the particle systems that make up this effect. More...
 
void setMaxParticlesToEmit (int max)
 Set the maximum number of particles to emit. More...
 
int maxParticlesToEmit ()
 Get the maximum number of particles to emit. More...
 
virtual osg::Vec3 wind () const
 Get a previously set wind value. More...
 
virtual void setWind (const osg::Vec3 &wind)
 Set the wind vector. More...
 
virtual void setGroundDist (float groundDist)
 For rotorwash type effects, set the distance from the particle effect to the helicopter This method is currently not used (but is used in the particle system effects) More...
 
virtual float groundDist ()
 For rotorwash type effects, get the distance from the particle effect to the helicopter. More...
 
virtual void setIsRotorWash (bool isRotorWash)
 For rotorwash type effects, scale the vortex force and radius based on the distance from the particle effect to the helicopter This method is currently not used (but is used in the particle system effects) More...
 
virtual bool isRotorWash ()
 For rotorwash type effects, get whether we scale the vortex force and radius based on the distance from the particle effect to the helicopter. More...
 
virtual void setRotorDiameter (double diameter)
 For rotorwash type effects, set the diameter of the helicoper rotor blades (rotor disk) More...
 
virtual double rotorDiameter () const
 For rotorwash type effects, get the diameter of the helicoper rotor blades (rotor disk) More...
 
virtual void setRotorWindSpeed (double speed)
 For rotorwash type effects, set the speed of the helicoper rotor blade rotation. More...
 
virtual double rotorWindSpeed () const
 For rotorwash type effects, get the speed of the helicoper rotor blade rotation. More...
 
virtual osg::Vec3 up () const
 Get a previously set up value. More...
 
virtual void setUp (const osg::Vec3 &up)
 set the up value More...
 
virtual void stop ()
 Stop the particle effect. More...
 
virtual void start ()
 start the particle effect More...
 
virtual void pause ()
 Pause the particle effect. More...
 
virtual void resume ()
 resume the particle effect More...
 
virtual void setLoopMode (bool loopOn)
 Set whether or not looping is on. More...
 
virtual void setReverseAnimation (bool reverse)
 Animations to reverse. More...
 
virtual void traverse (osg::NodeVisitor &nv)
 Interrupt CullVisitors to update the transforms. More...
 
virtual osg::Node * particleSystemNode ()
 Get the node containing the particle system geometry. More...
 
virtual osg::Geode * particleSystemGeode ()
 Get an osg Geode containing drawables for this effect's particle systems. More...
 
virtual void setMatrix (const osg::Matrix &mat)
 Set the matrix transform that this particle effect is currently beneath. More...
 
void getSizeRange (osgParticle::ParticleSystem *particleSystem, float &min, float &max) const
 The the minimum and maximum particle sizes cached for a particular particle system. More...
 
virtual void addParent (osg::Group *parent)
 Specify a group that has this effect as a child node. More...
 
virtual void setupParticleScalingDefaults (osgParticle::ParticleSystem *ps)
 Grab the mininum and maximum particle sizes from the particle system. More...
 
virtual void setupParticleLightingDefaults (osgParticle::ParticleSystem *ps)
 Set how lighting should affect this particle system. More...
 
virtual void scaleDefaultParticleSizes (float scale)
 Scale the size of new particles. More...
 
virtual ~DtParticleEffect ()
 DTOR. More...
 
 DtParticleEffect (const DtParticleEffect &copy, const osg::CopyOp &copyop)
 Copy CTOR - not implemented. More...
 

Detailed Description

This class provides a facade around the osgParticle class hierarchy.

It is comparable with osgParticle::ParticleEffect, but with support for multiple particle systems and designed for inheritance.

Member Typedef Documentation

typedef boost::unordered_map<osgParticle::ParticleSystem*,DefaultParticleParameters> makVrv::DtParticleEffect::ParticleParametersMap
protected

Constructor & Destructor Documentation

makVrv::DtParticleEffect::DtParticleEffect ( )

CTOR.

virtual makVrv::DtParticleEffect::~DtParticleEffect ( )
protectedvirtual

DTOR.

makVrv::DtParticleEffect::DtParticleEffect ( const DtParticleEffect copy,
const osg::CopyOp &  copyop 
)
protected

Copy CTOR - not implemented.

Member Function Documentation

virtual const char* makVrv::DtParticleEffect::libraryName ( ) const
virtual
virtual const char* makVrv::DtParticleEffect::className ( ) const
virtual

Get the name of the object's class.

virtual bool makVrv::DtParticleEffect::isSameKindAs ( const osg::Object *  obj) const
virtual

Test for type sameness.

virtual void makVrv::DtParticleEffect::accept ( osg::NodeVisitor &  v)
virtual
virtual osg::Group* makVrv::DtParticleEffect::emitterGroup ( )
virtual

Get an osg Group containing the emitters for this effect.

virtual osg::Group* makVrv::DtParticleEffect::programGroup ( )
virtual

Get an osg Group containing the programs for this effect.

virtual osg::Group* makVrv::DtParticleEffect::proxyGroup ( )
virtual

Get an osg Group containing the effect's proxy nodes.

virtual osg::Group* makVrv::DtParticleEffect::transformGroup ( )
virtual

Get an osg Group containing transforms placed at the top of the effect.

virtual void makVrv::DtParticleEffect::setUpEmittersAndPrograms ( )
pure virtual

Set the emitter group and program group appropriately.

Implemented in makVrv::DtCopyableParticleEffect.

virtual void makVrv::DtParticleEffect::buildEffect ( )
virtual

Build the effect up from its current state.

virtual bool makVrv::DtParticleEffect::useLocalParticleSystem ( )
virtual

Get a previously set useLocalParticleSystem flag.

virtual void makVrv::DtParticleEffect::setUseLocalParticleSystem ( bool  b)
virtual

Included for possible future use.

This method currently has no effect.

Reimplemented in makVrv::DtCopyableParticleEffect.

virtual float makVrv::DtParticleEffect::scale ( ) const
virtual

Get the current particle system scale factor.

virtual void makVrv::DtParticleEffect::setScale ( float  scale)
virtual

Scale the particle system by the specified value.

Both the geometry of the system as well as the size of individual particles are scaled.

virtual float makVrv::DtParticleEffect::intensity ( )
virtual

Get a previously set intensity.

virtual void makVrv::DtParticleEffect::setIntensity ( float  intensity)
virtual

Included for possible future use.

This method currently has no effect.

virtual double makVrv::DtParticleEffect::startTime ( )
virtual

Get the start time of the particle effect.

virtual void makVrv::DtParticleEffect::setStartTime ( double  startTime)
virtual

Set the start time of the particle effect.

virtual double makVrv::DtParticleEffect::emitterDuration ( )
virtual

Get the emitter duration previously set.

virtual void makVrv::DtParticleEffect::setEmitterDuration ( double  emitterDuration)
virtual

Set the emitter duration.

This sets the lifetime of future particles emitted, for all emitters in the effect

virtual double makVrv::DtParticleEffect::particleLifetime ( )
virtual

Find the maximum lifetime of any future particle in any of the particle systems that make up this effect.

void makVrv::DtParticleEffect::setMaxParticlesToEmit ( int  max)

Set the maximum number of particles to emit.

int makVrv::DtParticleEffect::maxParticlesToEmit ( )

Get the maximum number of particles to emit.

virtual osg::Vec3 makVrv::DtParticleEffect::wind ( ) const
virtual

Get a previously set wind value.

virtual void makVrv::DtParticleEffect::setWind ( const osg::Vec3 &  wind)
virtual

Set the wind vector.

virtual void makVrv::DtParticleEffect::setGroundDist ( float  groundDist)
virtual

For rotorwash type effects, set the distance from the particle effect to the helicopter This method is currently not used (but is used in the particle system effects)

virtual float makVrv::DtParticleEffect::groundDist ( )
virtual

For rotorwash type effects, get the distance from the particle effect to the helicopter.

virtual void makVrv::DtParticleEffect::setIsRotorWash ( bool  isRotorWash)
virtual

For rotorwash type effects, scale the vortex force and radius based on the distance from the particle effect to the helicopter This method is currently not used (but is used in the particle system effects)

virtual bool makVrv::DtParticleEffect::isRotorWash ( )
virtual

For rotorwash type effects, get whether we scale the vortex force and radius based on the distance from the particle effect to the helicopter.

virtual void makVrv::DtParticleEffect::setRotorDiameter ( double  diameter)
virtual

For rotorwash type effects, set the diameter of the helicoper rotor blades (rotor disk)

virtual double makVrv::DtParticleEffect::rotorDiameter ( ) const
virtual

For rotorwash type effects, get the diameter of the helicoper rotor blades (rotor disk)

virtual void makVrv::DtParticleEffect::setRotorWindSpeed ( double  speed)
virtual

For rotorwash type effects, set the speed of the helicoper rotor blade rotation.

virtual double makVrv::DtParticleEffect::rotorWindSpeed ( ) const
virtual

For rotorwash type effects, get the speed of the helicoper rotor blade rotation.

virtual osg::Vec3 makVrv::DtParticleEffect::up ( ) const
virtual

Get a previously set up value.

virtual void makVrv::DtParticleEffect::setUp ( const osg::Vec3 &  up)
virtual

set the up value

virtual void makVrv::DtParticleEffect::stop ( )
virtual

Stop the particle effect.

virtual void makVrv::DtParticleEffect::start ( )
virtual

start the particle effect

virtual void makVrv::DtParticleEffect::pause ( )
virtual

Pause the particle effect.

virtual void makVrv::DtParticleEffect::resume ( )
virtual

resume the particle effect

virtual void makVrv::DtParticleEffect::setLoopMode ( bool  loopOn)
virtual

Set whether or not looping is on.

virtual void makVrv::DtParticleEffect::setReverseAnimation ( bool  reverse)
virtual

Animations to reverse.

virtual void makVrv::DtParticleEffect::traverse ( osg::NodeVisitor &  nv)
virtual

Interrupt CullVisitors to update the transforms.

virtual osg::Node* makVrv::DtParticleEffect::particleSystemNode ( )
virtual

Get the node containing the particle system geometry.

virtual osg::Geode* makVrv::DtParticleEffect::particleSystemGeode ( )
virtual

Get an osg Geode containing drawables for this effect's particle systems.

virtual void makVrv::DtParticleEffect::setMatrix ( const osg::Matrix &  mat)
virtual

Set the matrix transform that this particle effect is currently beneath.

Note that scaling also modifies this matrix, so use of this method may interfere.

void makVrv::DtParticleEffect::getSizeRange ( osgParticle::ParticleSystem *  particleSystem,
float &  min,
float &  max 
) const

The the minimum and maximum particle sizes cached for a particular particle system.

virtual void makVrv::DtParticleEffect::addParent ( osg::Group *  parent)
protectedvirtual

Specify a group that has this effect as a child node.

virtual void makVrv::DtParticleEffect::setupParticleScalingDefaults ( osgParticle::ParticleSystem *  ps)
protectedvirtual

Grab the mininum and maximum particle sizes from the particle system.

These will be scaled when the particle effect is scaled

virtual void makVrv::DtParticleEffect::setupParticleLightingDefaults ( osgParticle::ParticleSystem *  ps)
protectedvirtual

Set how lighting should affect this particle system.

virtual void makVrv::DtParticleEffect::scaleDefaultParticleSizes ( float  scale)
protectedvirtual

Scale the size of new particles.

In addition to scaling the entire effect (which scales the particle positions) the particle sizes also need to be scaled.

Member Data Documentation

osg::ref_ptr<osg::Group> makVrv::DtParticleEffect::myEmitterGroup
protected
osg::ref_ptr<osg::Group> makVrv::DtParticleEffect::myProgramGroup
protected
osg::ref_ptr<osg::Geode> makVrv::DtParticleEffect::myParticleSystemGeode
protected
osg::ref_ptr<osg::Group> makVrv::DtParticleEffect::myProxyGroup
protected
osg::ref_ptr<osg::Group> makVrv::DtParticleEffect::myTransformGroup
protected
std::vector<osg::ref_ptr<osg::Sequence> > makVrv::DtParticleEffect::mySequences
protected
bool makVrv::DtParticleEffect::mySequencesLooping
protected
bool makVrv::DtParticleEffect::mySequencesReverse
protected
osg::ref_ptr<osg::MatrixTransform> makVrv::DtParticleEffect::myParticleSystemTransform
protected
bool makVrv::DtParticleEffect::myTransformsSet
protected
bool makVrv::DtParticleEffect::myUseLocalParticleSystem
protected
osg::Vec3 makVrv::DtParticleEffect::myPosition
protected
float makVrv::DtParticleEffect::myScale
protected
float makVrv::DtParticleEffect::myIntensity
protected
double makVrv::DtParticleEffect::myStartTime
protected
double makVrv::DtParticleEffect::myEmitterDuration
protected
int makVrv::DtParticleEffect::myMaxParticlesToEmit
protected
osg::Vec3 makVrv::DtParticleEffect::myWind
protected
osg::Vec3 makVrv::DtParticleEffect::myUp
protected
float makVrv::DtParticleEffect::myGroundDist
protected
bool makVrv::DtParticleEffect::myIsRotorWash
protected
float makVrv::DtParticleEffect::myRotorDiameter
protected
float makVrv::DtParticleEffect::myRotorWindSpeed
protected
ParticleParametersMap makVrv::DtParticleEffect::myDefaultParticleParameters
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)