VR-Forces 4.0.4 Class Documentation
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Attributes
makVrv::DtOsgParticleRibbon Class Reference

A ribbon with some particle system features, such as expansion rate texture, and fading out. More...

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

List of all members.

Classes

struct  Particle
 Definition for a particle in the ribbon. More...

Public Member Functions

 DtOsgParticleRibbon (float segmentSpacing, const osg::Vec4 &color, osg::Texture *texture, float expansionRate, float maxLength=2000)
 CTOR.
virtual void update (double dt, double simTime)
 Override the behavior of the osg ribbon.
virtual void setAlphaVelocity (float alphaVelocity)
 Set the rate in units/second at which the alpha values of particles change.
virtual void setTextureRepeat (float textureRepeat)
 Set the number of copies of the texture to repeat into each quad.

Protected Member Functions

virtual ~DtOsgParticleRibbon ()
 DTOR.
virtual void addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Add a particle to the ribbon.
virtual float currentSegmentLength ()
 Find the length of the current ribbon segment.
virtual void extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Extend the current segment to left and right points.
virtual osg::Drawable * getDrawable ()
 Create or get the ribbon drawable.
virtual int particleIndexAtOffset (int offset)
 Get index of particle at offset from current particle.
virtual void updateParticles (double dt)
 Update the particles with given time change.
virtual void updateGeometry (double dt)
 Update the geometry with the given time change.
virtual osg::Vec2 getTextureCoordinateFor (int pointIndex, float vScale)
 Get the texture coordinate for a vertex.
virtual osg::Geode * createGeode ()
 Create the geode to reender the ribbon.

Private Types

typedef std::list< ParticleParticles

Private Attributes

osg::ref_ptr< osg::Vec3Array > myPoints
osg::ref_ptr< osg::Vec4Array > myColors
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
osg::ref_ptr< osg::Texture > myTexture
bool myWrappingVertices
int myParticleIndex
float myTextureRepeat
double myLastAddTime
Particles myParticles
float myAlphaVelocity
float myExpansionRate
 speed at which alpha decreases
float myRotationalVelocity
 speed at which particles move apart
double myLastUpdateTime

Detailed Description

A ribbon with some particle system features, such as expansion rate texture, and fading out.


Member Typedef Documentation

typedef std::list<Particle> makVrv::DtOsgParticleRibbon::Particles [private]

Constructor & Destructor Documentation

makVrv::DtOsgParticleRibbon::DtOsgParticleRibbon ( float  segmentSpacing,
const osg::Vec4 &  color,
osg::Texture *  texture,
float  expansionRate,
float  maxLength = 2000 
)

CTOR.

virtual makVrv::DtOsgParticleRibbon::~DtOsgParticleRibbon ( ) [protected, virtual]

DTOR.


Member Function Documentation

virtual void makVrv::DtOsgParticleRibbon::update ( double  dt,
double  simTime 
) [virtual]

Override the behavior of the osg ribbon.

Reimplemented from makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgParticleRibbon::setAlphaVelocity ( float  alphaVelocity) [virtual]

Set the rate in units/second at which the alpha values of particles change.

virtual void makVrv::DtOsgParticleRibbon::setTextureRepeat ( float  textureRepeat) [virtual]

Set the number of copies of the texture to repeat into each quad.

Textures are tiled in their v coordinate only.

virtual void makVrv::DtOsgParticleRibbon::addParticle ( osg::Vec3d const &  left,
osg::Vec3d const &  right,
double  simTime 
) [protected, virtual]

Add a particle to the ribbon.

Implements makVrv::DtOsgRibbon.

virtual float makVrv::DtOsgParticleRibbon::currentSegmentLength ( ) [protected, virtual]

Find the length of the current ribbon segment.

Implements makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgParticleRibbon::extendCurrentSegment ( osg::Vec3d const &  left,
osg::Vec3d const &  right,
double  simTime 
) [protected, virtual]

Extend the current segment to left and right points.

Implements makVrv::DtOsgRibbon.

virtual osg::Drawable* makVrv::DtOsgParticleRibbon::getDrawable ( ) [protected, virtual]

Create or get the ribbon drawable.

Implements makVrv::DtOsgRibbon.

virtual int makVrv::DtOsgParticleRibbon::particleIndexAtOffset ( int  offset) [protected, virtual]

Get index of particle at offset from current particle.

virtual void makVrv::DtOsgParticleRibbon::updateParticles ( double  dt) [protected, virtual]

Update the particles with given time change.

virtual void makVrv::DtOsgParticleRibbon::updateGeometry ( double  dt) [protected, virtual]

Update the geometry with the given time change.

virtual osg::Vec2 makVrv::DtOsgParticleRibbon::getTextureCoordinateFor ( int  pointIndex,
float  vScale 
) [protected, virtual]

Get the texture coordinate for a vertex.

virtual osg::Geode* makVrv::DtOsgParticleRibbon::createGeode ( ) [protected, virtual]

Create the geode to reender the ribbon.

Reimplemented from makVrv::DtOsgRibbon.


Member Data Documentation

osg::ref_ptr<osg::Vec3Array> makVrv::DtOsgParticleRibbon::myPoints [private]
osg::ref_ptr<osg::Vec4Array> makVrv::DtOsgParticleRibbon::myColors [private]
osg::ref_ptr<osg::Vec2Array> makVrv::DtOsgParticleRibbon::myTextureCoordinates [private]
osg::ref_ptr<osg::Texture> makVrv::DtOsgParticleRibbon::myTexture [private]

speed at which alpha decreases

speed at which particles move apart

Reimplemented from makVrv::DtOsgRibbon.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)