16 #include <osg/MatrixTransform>
39 float segmentSpacing = 1.0,
40 const osg::Vec4& color = osg::Vec4d(0.5, 0.5, 0.5, 1.0),
41 float maxLength = 2000,
42 float timeout = 3600.0);
57 virtual void traverse(osg::NodeVisitor& nv);
60 virtual osg::Node* node();
63 virtual void setColor(
const osg::Vec4& color);
66 virtual const osg::Vec4&
color()
const {
return myColor; }
69 virtual void setDroppedPoints(
const osg::Vec3d& pointA,
const osg::Vec3d& pointB);
74 virtual void setDroppedPointsPositionOffset(
const osg::Vec3d& posOffset);
77 virtual void update(
double dt,
double simTime);
81 virtual void update();
84 virtual void setMaxSegments(
long segments);
87 inline virtual long maxSegments()
const {
return myMaxSegments; }
90 virtual void setSegmentSpacing(
float spacing);
93 virtual void setSegmentTimeout(
float duration);
104 virtual void setStippled(
bool stippled);
110 inline virtual bool isStippled()
const {
return myStippled; }
113 virtual void setLightingEnabled(
bool enable);
116 virtual bool lightingEnabled();
119 virtual void setHeightLinesEnabled(
bool enabled);
122 virtual void setHeightLinesColor(
float r,
float g,
float b,
float a);
125 virtual void setHeightLinesSpacing(
float spacing);
128 virtual void setHeightLinesModelSetId(
DtModelSetId modelSetId);
133 virtual void addParticle(osg::Vec3d
const& left, osg::Vec3d
const& right,
137 virtual float currentSegmentLength() = 0;
140 virtual void setCurrentSegmentLength(
float len );
145 virtual void cleanupOldSegments(
double simTime) = 0;
148 virtual void extendCurrentSegment(osg::Vec3d
const& left,
149 osg::Vec3d
const& right,
double simTime) = 0;
152 virtual osg::Drawable* getDrawable() = 0;
155 virtual osg::Geode* createGeode();
158 virtual void setDrawable();
189 float myHeightLinesColor[4];
long myMaxSegments
Definition: DtOsgRibbon.h:171
int myLastUpdatedFrame
Definition: DtOsgRibbon.h:167
virtual long maxSegments() const
Gets the maximum number of segments allowed in the ribbon.
Definition: DtOsgRibbon.h:87
DtModelSetId myHeightLinesModelSetId
Definition: DtOsgRibbon.h:191
osg::Matrixd myWorldTransformInv
Definition: DtOsgRibbon.h:164
bool myFirstUpdate
Definition: DtOsgRibbon.h:182
float mySegmentTimeout
Definition: DtOsgRibbon.h:175
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myStippled
Definition: DtOsgRibbon.h:183
bool myShaderSet
Definition: DtOsgRibbon.h:187
DtDe & myDe
Definition: DtOsgRibbon.h:185
osg::ref_ptr< osg::MatrixTransform > myPositionNode
Definition: DtOsgRibbon.h:162
osg::Vec3d myLocalPointA
Definition: DtOsgRibbon.h:177
virtual bool isStippled() const
Get the stipple setting for this ribbon.
Definition: DtOsgRibbon.h:110
osg::ref_ptr< osg::Geode > myGeode
Definition: DtOsgRibbon.h:163
double myRibbonLengthSquared
Definition: DtOsgRibbon.h:169
bool myLightingEnabled
Definition: DtOsgRibbon.h:186
float mySegmentSpacingSquared
Definition: DtOsgRibbon.h:173
virtual const osg::Vec4 & color() const
Get the ribbon's color.
Definition: DtOsgRibbon.h:66
osg::Vec3d myLocalPointB
Definition: DtOsgRibbon.h:178
bool myHeightLinesEnabled
Definition: DtOsgRibbon.h:188
osg::Vec3d myLocalPosOffset
Definition: DtOsgRibbon.h:179
osg::Vec4 myColor
Definition: DtOsgRibbon.h:181
Base class for OSG ribbon implementations.
Definition: DtOsgRibbon.h:27
osg::Matrixd myLastLocalToWork
Definition: DtOsgRibbon.h:165
float mySegmentSpacing
Definition: DtOsgRibbon.h:174
virtual float segmentSpacing() const
Gets the maximum length of the ribbon segments.
Definition: DtOsgRibbon.h:96
Contains DLL export macros.
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:76
int myActiveSegmentCount
Definition: DtOsgRibbon.h:172
float myHeightLinesSpacing
Definition: DtOsgRibbon.h:190
DtModelSetId
Definition: DtModelSetEnums.h:19
double myLastUpdateTime
Definition: DtOsgRibbon.h:168
Contains various enum classes relating to model sets.