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 | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
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]

Classes

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

Public Member Functions

virtual void update (double dt, double simTime)
 Override the behavior of the osg ribbon. More...
 
virtual void setAlphaVelocity (float alphaVelocity)
 Set the rate in units/second at which the alpha values of particles change. More...
 
virtual void setTextureRepeat (float textureRepeat)
 Set the number of copies of the texture to repeat into each quad. More...
 
virtual void setNewParticlesVisible (bool enable)
 If true then particles are created normally. More...
 
- Public Member Functions inherited from makVrv::DtOsgRibbon
 DtOsgRibbon (DtDe &de, float segmentSpacing=1.0, const osg::Vec4 &color=osg::Vec4d(0.5, 0.5, 0.5, 1.0), float maxLength=2000, float timeout=3600.0)
 CTOR. More...
 
virtual ~DtOsgRibbon ()
 DTOR. More...
 
virtual void traverse (osg::NodeVisitor &nv)
 Interrupt CullVisitors by updating the ribbon. More...
 
virtual osg::Node * node ()
 Get the osg geometry node associated with the ribbon. More...
 
virtual void setColor (const osg::Vec4 &color)
 Set the ribbon's color. More...
 
virtual const osg::Vec4 & color () const
 Get the ribbon's color. More...
 
virtual void setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB)
 Set the points to drop in local coordinates. More...
 
virtual void setDroppedPointsPositionOffset (const osg::Vec3d &posOffset)
 Provide an offset to the dropped points so the entity can shift around the points specified in the model definition ex. More...
 
virtual void update ()
 Optional time independent update method. More...
 
virtual void setMaxSegments (long segments)
 Sets the maximum number of segments allowed in the ribbon. More...
 
virtual long maxSegments () const
 Gets the maximum number of segments allowed in the ribbon. More...
 
virtual void setSegmentSpacing (float spacing)
 Sets the maximum length of ribbon segments. More...
 
virtual void setSegmentTimeout (float duration)
 Sets the timeout of a ribbon segment. More...
 
virtual float segmentSpacing () const
 Gets the maximum length of the ribbon segments. More...
 
virtual void setStippled (bool stippled)
 
virtual bool isStippled () const
 Get the stipple setting for this ribbon. More...
 
virtual void setLightingEnabled (bool enable)
 set to true the lighting enabled flag to turn lighting on for the ribbon More...
 
virtual bool lightingEnabled ()
 get the lighting enabled flag More...
 

Protected Types

typedef std::list< ParticleParticles
 

Protected Member Functions

 DtOsgParticleRibbon (DtDe &de, float segmentSpacing, const osg::Vec4 &color, osg::Texture *texture, float expansionRate, float maxLength)
 CTOR (create through DtOsgDecalRibbonCreator method) More...
 
virtual ~DtOsgParticleRibbon ()
 DTOR. More...
 
virtual void addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Add a particle to the ribbon. More...
 
virtual float currentSegmentLength ()
 Find the length of the current ribbon segment. More...
 
virtual void extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Extend the current segment to left and right points. More...
 
virtual osg::Drawable * getDrawable ()
 Create or get the ribbon drawable. More...
 
virtual int particleIndexAtOffset (int offset)
 Get index of particle at offset from current particle. More...
 
virtual void updateParticles (double dt)
 Update the particles with given time change. More...
 
virtual void updateGeometry (double dt)
 Update the geometry with the given time change. More...
 
virtual osg::Vec2 getTextureCoordinateFor (int pointIndex, float vScale)
 Get the texture coordinate for a vertex. More...
 
virtual osg::Geode * createGeode ()
 Create the geode to reender the ribbon. More...
 
virtual void cleanupOldSegments (double simTime)
 Check to see if any segments have reached their timeout if so remove them from the list to be rendered. More...
 
- Protected Member Functions inherited from makVrv::DtOsgRibbon
virtual void setDrawable ()
 Removes any existing drawables and add the drawable returned from getDrawable. More...
 

Protected 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 More...
 
float myRotationalVelocity
 speed at which particles move apart More...
 
bool myNewParticleVisible
 
- Protected Attributes inherited from makVrv::DtOsgRibbon
osg::ref_ptr
< osg::MatrixTransform > 
myPositionNode
 
osg::ref_ptr< osg::Geode > myGeode
 
osg::Matrixd myWorldTransformInv
 
osg::Matrixd myLastLocalToWork
 
int myLastUpdatedFrame
 
double myLastUpdateTime
 
long myMaxSegments
 
float mySegmentSpacingSquared
 
float mySegmentSpacing
 
float mySegmentTimeout
 
osg::Vec3d myLocalPointA
 
osg::Vec3d myLocalPointB
 
osg::Vec3d myLocalPosOffset
 
osg::Vec4 myColor
 
bool myFirstUpdate
 
bool myStippled
 
DtDemyDe
 
bool myLightingEnabled
 
bool myShaderSet
 

Private Member Functions

 DtOsgParticleRibbon ()
 unimplemented private default constructor More...
 
 DtOsgParticleRibbon (const DtOsgParticleRibbon &)
 Copy Constructor not implemented – Copy not allowed. More...
 
DtOsgParticleRibbonoperator= (const DtOsgParticleRibbon &)
 Assignment Operator not implemented – Copy not allowed. More...
 

Friends

class DtOsgParticleRibbonCreator
 

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
protected

Constructor & Destructor Documentation

makVrv::DtOsgParticleRibbon::DtOsgParticleRibbon ( DtDe de,
float  segmentSpacing,
const osg::Vec4 &  color,
osg::Texture *  texture,
float  expansionRate,
float  maxLength 
)
protected

CTOR (create through DtOsgDecalRibbonCreator method)

virtual makVrv::DtOsgParticleRibbon::~DtOsgParticleRibbon ( )
protectedvirtual

DTOR.

makVrv::DtOsgParticleRibbon::DtOsgParticleRibbon ( )
private

unimplemented private default constructor

makVrv::DtOsgParticleRibbon::DtOsgParticleRibbon ( const DtOsgParticleRibbon )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

DtOsgParticleRibbon& makVrv::DtOsgParticleRibbon::operator= ( const DtOsgParticleRibbon )
private

Assignment Operator not implemented – Copy not allowed.

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::setNewParticlesVisible ( bool  enable)
virtual

If true then particles are created normally.

If false than all new particles have an alpha of 0 so they are still created but not visible and the transition from off to on is not a sudden one.

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

Add a particle to the ribbon.

Implements makVrv::DtOsgRibbon.

virtual float makVrv::DtOsgParticleRibbon::currentSegmentLength ( )
protectedvirtual

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 
)
protectedvirtual

Extend the current segment to left and right points.

Implements makVrv::DtOsgRibbon.

virtual osg::Drawable* makVrv::DtOsgParticleRibbon::getDrawable ( )
protectedvirtual

Create or get the ribbon drawable.

Implements makVrv::DtOsgRibbon.

virtual int makVrv::DtOsgParticleRibbon::particleIndexAtOffset ( int  offset)
protectedvirtual

Get index of particle at offset from current particle.

virtual void makVrv::DtOsgParticleRibbon::updateParticles ( double  dt)
protectedvirtual

Update the particles with given time change.

virtual void makVrv::DtOsgParticleRibbon::updateGeometry ( double  dt)
protectedvirtual

Update the geometry with the given time change.

virtual osg::Vec2 makVrv::DtOsgParticleRibbon::getTextureCoordinateFor ( int  pointIndex,
float  vScale 
)
protectedvirtual

Get the texture coordinate for a vertex.

virtual osg::Geode* makVrv::DtOsgParticleRibbon::createGeode ( )
protectedvirtual

Create the geode to reender the ribbon.

Reimplemented from makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgParticleRibbon::cleanupOldSegments ( double  simTime)
protectedvirtual

Check to see if any segments have reached their timeout if so remove them from the list to be rendered.

currently only implemented for track histories.

Implements makVrv::DtOsgRibbon.

Friends And Related Function Documentation

friend class DtOsgParticleRibbonCreator
friend

Member Data Documentation

osg::ref_ptr<osg::Vec3Array> makVrv::DtOsgParticleRibbon::myPoints
protected
osg::ref_ptr<osg::Vec4Array> makVrv::DtOsgParticleRibbon::myColors
protected
osg::ref_ptr<osg::Vec2Array> makVrv::DtOsgParticleRibbon::myTextureCoordinates
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgParticleRibbon::myTexture
protected
bool makVrv::DtOsgParticleRibbon::myWrappingVertices
protected
int makVrv::DtOsgParticleRibbon::myParticleIndex
protected
float makVrv::DtOsgParticleRibbon::myTextureRepeat
protected
double makVrv::DtOsgParticleRibbon::myLastAddTime
protected
Particles makVrv::DtOsgParticleRibbon::myParticles
protected
float makVrv::DtOsgParticleRibbon::myAlphaVelocity
protected
float makVrv::DtOsgParticleRibbon::myExpansionRate
protected

speed at which alpha decreases

float makVrv::DtOsgParticleRibbon::myRotationalVelocity
protected

speed at which particles move apart

bool makVrv::DtOsgParticleRibbon::myNewParticleVisible
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)