17 #include <osg/Geometry>
18 #include <osg/PrimitiveSet>
22 class DrawElementsUInt;
37 const osg::Vec4& color, osg::Texture* texture,
38 float expansionRate,
float maxLength);
56 virtual void update(
double dt,
double simTime)
override;
60 virtual void setAlphaVelocity(
float alphaVelocity);
64 virtual void setTextureRepeat(
float textureRepeat);
70 virtual void setNewParticlesVisible(
bool enable);
74 virtual void addParticle(osg::Vec3d
const& left, osg::Vec3d
const& right,
75 double simTime)
override;
78 virtual float currentSegmentLength()
override;
83 virtual void cleanupOldSegments(
double simTime)
override;
86 virtual void extendCurrentSegment(osg::Vec3d
const& left,
87 osg::Vec3d
const& right,
double simTime)
override;
90 virtual osg::Drawable* getDrawable()
override;
93 virtual osg::Geode* createGeode()
override;
96 virtual int particleIndexAtOffset(
int offset);
99 virtual void updateParticles(
double dt);
102 virtual void updateGeometryFromParticles(
double dt);
105 virtual osg::Vec2 getTextureCoordinateFor(
int pointIndex,
float vScale)
const;
168 const osg::Vec4& color, osg::Texture* texture,
169 float expansionRate,
float maxLength);
float angle
left-to-right axis of the particle's quad
Definition: DtOsgParticleRibbon.h:130
bool myNewParticleVisible
Definition: DtOsgParticleRibbon.h:141
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::list< Particle > Particles
Definition: DtOsgParticleRibbon.h:134
Definition: DtOsgParticleRibbon.h:147
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osg::Vec3Array > myPoints
Definition: DtOsgParticleRibbon.h:108
Particles myParticles
Definition: DtOsgParticleRibbon.h:135
osg::Vec3d axis
Definition: DtOsgParticleRibbon.h:129
osg::ref_ptr< osg::Geometry > myGeometry
Definition: DtOsgParticleRibbon.h:115
float myRotationalVelocity
speed at which particles move apart
Definition: DtOsgParticleRibbon.h:139
double myLastAddTime
Definition: DtOsgParticleRibbon.h:121
float myTextureRepeat
Definition: DtOsgParticleRibbon.h:120
osg::Vec3d center
Definition: DtOsgParticleRibbon.h:126
Contains makVrv::DtVirtualBaseClass class.
osg::ref_ptr< osg::Vec4Array > myColors
Definition: DtOsgParticleRibbon.h:109
Definition for a particle in the ribbon.
Definition: DtOsgParticleRibbon.h:124
osg::Vec3d right
Definition: DtOsgParticleRibbon.h:128
int myParticleIndex
Definition: DtOsgParticleRibbon.h:119
float alpha
How much rotation is applied to the particle.
Definition: DtOsgParticleRibbon.h:131
Base class for OSG ribbon implementations.
Definition: DtOsgRibbon.h:25
A ribbon with some particle system features, such as expansion rate texture, and fading out...
Definition: DtOsgParticleRibbon.h:32
float myAlphaVelocity
Definition: DtOsgParticleRibbon.h:137
osg::ref_ptr< osg::DrawElementsUInt > myRibbon
Definition: DtOsgParticleRibbon.h:114
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
Definition: DtOsgParticleRibbon.h:110
voidpf uLong offset
Definition: ioapi.h:42
osg::ref_ptr< osg::Texture > myTexture
Definition: DtOsgParticleRibbon.h:112
bool myWrappingVertices
Definition: DtOsgParticleRibbon.h:118
osg::Vec3d left
center back of the particle's quad
Definition: DtOsgParticleRibbon.h:127
float myExpansionRate
speed at which alpha decreases
Definition: DtOsgParticleRibbon.h:138