14 #include <osg/MatrixTransform>
35 float segmentSpacing = 1.0,
36 const osg::Vec4& color = osg::Vec4d(0.5, 0.5, 0.5, 1.0),
37 float maxLength = 2000,
38 float timeout = 3600.0);
53 virtual void traverse(osg::NodeVisitor& nv);
56 virtual osg::Node* node();
59 virtual void setColor(
const osg::Vec4& color);
62 virtual const osg::Vec4&
color()
const {
return myColor; }
65 virtual void setDroppedPoints(
const osg::Vec3d& pointA,
const osg::Vec3d& pointB);
70 virtual void setDroppedPointsPositionOffset(
const osg::Vec3d& posOffset);
73 virtual void update(
double dt,
double simTime);
79 virtual void setMaxSegments(
long segments);
82 inline virtual long maxSegments()
const {
return myMaxSegments; }
85 virtual void setSegmentSpacing(
float spacing);
88 virtual void setSegmentTimeout(
float duration);
99 virtual void setStippled(
bool stippled);
105 inline virtual bool isStippled()
const {
return myStippled; }
108 virtual void setLightingEnabled(
bool enable);
111 virtual bool lightingEnabled();
116 virtual void addParticle(osg::Vec3d
const& left, osg::Vec3d
const& right,
120 virtual float currentSegmentLength() = 0;
125 virtual void cleanupOldSegments(
double simTime) = 0;
128 virtual void extendCurrentSegment(osg::Vec3d
const& left,
129 osg::Vec3d
const& right,
double simTime) = 0;
132 virtual osg::Drawable* getDrawable() = 0;
135 virtual osg::Geode* createGeode();
138 virtual void setDrawable();
long myMaxSegments
Definition: DtOsgRibbon.h:150
int myLastUpdatedFrame
Definition: DtOsgRibbon.h:147
virtual long maxSegments() const
Gets the maximum number of segments allowed in the ribbon.
Definition: DtOsgRibbon.h:82
osg::Matrixd myWorldTransformInv
Definition: DtOsgRibbon.h:144
bool myFirstUpdate
Definition: DtOsgRibbon.h:160
float mySegmentTimeout
Definition: DtOsgRibbon.h:153
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myStippled
Definition: DtOsgRibbon.h:161
bool myShaderSet
Definition: DtOsgRibbon.h:166
DtDe & myDe
Definition: DtOsgRibbon.h:163
osg::ref_ptr< osg::MatrixTransform > myPositionNode
Definition: DtOsgRibbon.h:142
osg::Vec3d myLocalPointA
Definition: DtOsgRibbon.h:155
virtual bool isStippled() const
Get the stipple setting for this ribbon.
Definition: DtOsgRibbon.h:105
osg::ref_ptr< osg::Geode > myGeode
Definition: DtOsgRibbon.h:143
virtual void update()
Optional time independent update method.
Definition: DtOsgRibbon.h:76
bool myLightingEnabled
Definition: DtOsgRibbon.h:164
float mySegmentSpacingSquared
Definition: DtOsgRibbon.h:151
virtual const osg::Vec4 & color() const
Get the ribbon's color.
Definition: DtOsgRibbon.h:62
osg::Vec3d myLocalPointB
Definition: DtOsgRibbon.h:156
osg::Vec3d myLocalPosOffset
Definition: DtOsgRibbon.h:157
osg::Vec4 myColor
Definition: DtOsgRibbon.h:159
Base class for OSG ribbon implementations.
Definition: DtOsgRibbon.h:25
osg::Matrixd myLastLocalToWork
Definition: DtOsgRibbon.h:145
float mySegmentSpacing
Definition: DtOsgRibbon.h:152
virtual float segmentSpacing() const
Gets the maximum length of the ribbon segments.
Definition: DtOsgRibbon.h:91
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
double myLastUpdateTime
Definition: DtOsgRibbon.h:148