A ribbon with some particle system features, such as expansion rate texture, and fading out.
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.
|
| | DtOsgRibbon () |
| | Default CTOR.
|
| | DtOsgRibbon (float segmentSpacing, const osg::Vec4 &color, float maxLength=2000) |
| | CTOR.
|
| virtual | ~DtOsgRibbon () |
| | DTOR.
|
| virtual void | traverse (osg::NodeVisitor &nv) |
| | Interrupt CullVisitors by updating the ribbon.
|
| virtual osg::Node * | node () |
| | Get the osg geometry node associated with the ribbon.
|
| virtual void | setColor (const osg::Vec4 &color) |
| | Set the ribbon's color.
|
| const osg::Vec4 & | color () const |
| | Get the ribbon's color.
|
| virtual void | setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB) |
| | Set the points to drop in local coordinates.
|
| virtual void | update () |
| | optional time independent update method.
|
| virtual void | setMaxSegments (long segments) |
| | Sets the maximum number of segments allowed in the ribbon.
|
| long | maxSegments () const |
| | Gets the maximum number of segments allowed in the ribbon.
|
| virtual void | setSegmentSpacing (float spacing) |
| | Sets the maximum length of ribbon segments.
|
| float | segmentSpacing () const |
| | Gets the maximum length of the ribbon segments.
|
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.
|
| virtual void | setDrawable () |
| | Removes any existing drawables and add the drawable returned from getDrawable.
|
Detailed Description
A ribbon with some particle system features, such as expansion rate texture, and fading out.
Member Typedef Documentation
Constructor & Destructor Documentation
| makVrv::DtOsgParticleRibbon::DtOsgParticleRibbon |
( |
float |
segmentSpacing, |
|
|
const osg::Vec4 & |
color, |
|
|
osg::Texture * |
texture, |
|
|
float |
expansionRate, |
|
|
float |
maxLength = 2000 |
|
) |
| |
| virtual makVrv::DtOsgParticleRibbon::~DtOsgParticleRibbon |
( |
| ) |
|
|
protectedvirtual |
Member Function Documentation
| virtual void makVrv::DtOsgParticleRibbon::update |
( |
double |
dt, |
|
|
double |
simTime |
|
) |
| |
|
virtual |
| 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 |
|
) |
| |
|
protectedvirtual |
| virtual float makVrv::DtOsgParticleRibbon::currentSegmentLength |
( |
| ) |
|
|
protectedvirtual |
| virtual void makVrv::DtOsgParticleRibbon::extendCurrentSegment |
( |
osg::Vec3d const & |
left, |
|
|
osg::Vec3d const & |
right, |
|
|
double |
simTime |
|
) |
| |
|
protectedvirtual |
| virtual osg::Drawable* makVrv::DtOsgParticleRibbon::getDrawable |
( |
| ) |
|
|
protectedvirtual |
| 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 |
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 |
| bool makVrv::DtOsgParticleRibbon::myWrappingVertices |
|
private |
| int makVrv::DtOsgParticleRibbon::myParticleIndex |
|
private |
| float makVrv::DtOsgParticleRibbon::myTextureRepeat |
|
private |
| double makVrv::DtOsgParticleRibbon::myLastAddTime |
|
private |
| Particles makVrv::DtOsgParticleRibbon::myParticles |
|
private |
| float makVrv::DtOsgParticleRibbon::myAlphaVelocity |
|
private |
| float makVrv::DtOsgParticleRibbon::myExpansionRate |
|
private |
speed at which alpha decreases
| float makVrv::DtOsgParticleRibbon::myRotationalVelocity |
|
private |
speed at which particles move apart
| double makVrv::DtOsgParticleRibbon::myLastUpdateTime |
|
private |
The documentation for this class was generated from the following file: