![]() |
VR-Forces Developer's Guide
|
Base class for OSG ribbon implementations.

Public Member Functions | |
| 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) | |
| virtual | ~DtOsgRibbon () |
| virtual void | traverse (osg::NodeVisitor &nv) |
| virtual osg::Node * | node () |
| virtual void | setColor (const osg::Vec4 &color) |
| virtual const osg::Vec4 & | color () const |
| virtual void | setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB) |
| virtual void | setDroppedPointsPositionOffset (const osg::Vec3d &posOffset) |
| virtual void | update (double dt, double simTime) |
| virtual void | update () |
| virtual void | setMaxSegments (long segments) |
| virtual long | maxSegments () const |
| virtual void | setSegmentSpacing (float spacing) |
| virtual void | setSegmentTimeout (float duration) |
| virtual float | segmentSpacing () const |
| virtual void | setStippled (bool stippled) |
| virtual bool | isStippled () const |
| virtual void | setLightingEnabled (bool enable) |
| virtual bool | lightingEnabled () |
| virtual void | setHeightLinesEnabled (bool enabled) |
| virtual void | setHeightLinesColor (float r, float g, float b, float a) |
| virtual void | setHeightLinesSpacing (float spacing) |
| virtual void | setHeightLinesModelSetId (DtModelSetId modelSetId) |
Protected Member Functions | |
| virtual void | addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| virtual float | currentSegmentLength ()=0 |
| virtual void | setCurrentSegmentLength (float len) |
| virtual void | cleanupOldSegments (double simTime)=0 |
| virtual void | extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| virtual osg::Drawable * | getDrawable ()=0 |
| virtual osg::Geode * | createGeode () |
| virtual void | setDrawable () |
Protected Attributes | |
| osg::ref_ptr < osg::MatrixTransform > | myPositionNode |
| osg::ref_ptr< osg::Geode > | myGeode |
| osg::Matrixd | myWorldTransformInv |
| osg::Matrixd | myLastLocalToWork |
| int | myLastUpdatedFrame |
| double | myLastUpdateTime |
| double | myRibbonLengthSquared |
| long | myMaxSegments |
| int | myActiveSegmentCount |
| float | mySegmentSpacingSquared |
| float | mySegmentSpacing |
| float | mySegmentTimeout |
| osg::Vec3d | myLocalPointA |
| osg::Vec3d | myLocalPointB |
| osg::Vec3d | myLocalPosOffset |
| osg::Vec4 | myColor |
| bool | myFirstUpdate |
| bool | myStippled |
| DtDe & | myDe |
| bool | myLightingEnabled |
| bool | myShaderSet |
| bool | myHeightLinesEnabled |
| float | myHeightLinesColor [4] |
| float | myHeightLinesSpacing |
| DtModelSetId | myHeightLinesModelSetId |
Private Member Functions | |
| DtOsgRibbon ()=delete | |
| DtOsgRibbon (const DtOsgRibbon &)=delete | |
| DtOsgRibbon & | operator= (const DtOsgRibbon &)=delete |
| 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.
| segmentSpacing | the distance between samples points (in meters). |
| color | the color of the ribbon. |
| maxLength | the max length of the ribbon (in samples). |
|
virtual |
DTOR.
|
privatedelete |
unimplemented private default constructor
|
privatedelete |
Copy Constructor not implemented – Copy not allowed.
|
privatedelete |
Assignment Operator not implemented – Copy not allowed.
|
virtual |
Interrupt CullVisitors by updating the ribbon.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
virtual |
Get the osg geometry node associated with the ribbon.
Reimplemented in makVrv::DtOsgMultiRibbon.
|
virtual |
Set the ribbon's color.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
inlinevirtual |
Get the ribbon's color.
|
virtual |
Set the points to drop in local coordinates.
|
virtual |
Provide an offset to the dropped points so the entity can shift around the points specified in the model definition ex. 5 ton truck can offset so front wheels leave tracks.
Reimplemented in makVrv::DtOsgMultiRibbon.
Update the ribbon with the current position.
Reimplemented in makVrv::DtOsgMultiRibbon, and makVrv::DtOsgParticleRibbon.
|
virtual |
Optional time independent update method.
nop for now
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
virtual |
Sets the maximum number of segments allowed in the ribbon.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
inlinevirtual |
Gets the maximum number of segments allowed in the ribbon.
|
virtual |
Sets the maximum length of ribbon segments.
|
virtual |
Sets the timeout of a ribbon segment.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
inlinevirtual |
Gets the maximum length of the ribbon segments.
|
virtual |
| [in] | stippled | is a flag to use a stipple pattern instead of alpha blending. When true, the ribbon is considered opaque and the stipple pattern allows see through. When false, the ribbon is considered transparent and alpha blending allows see through. |
|
inlinevirtual |
Get the stipple setting for this ribbon.
| true | if stippled. |
| false | otherwise. |
|
virtual |
set to true the lighting enabled flag to turn lighting on for the ribbon
|
virtual |
get the lighting enabled flag
|
virtual |
Enables or disables height lines along the ribbon path.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
virtual |
Sets the color for height lines.
|
virtual |
Sets the desired spacing for height lines.
|
virtual |
Sets the model set that the height lines should be used with.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
protectedpure virtual |
Add a particle to the ribbon.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Find the squared length of the current ribbon segment.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedvirtual |
Set the length of the current ribbon segment no-op.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
|
protectedpure virtual |
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.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Extend the current segment to left and right points.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Get the drawable responsible for drawing the ribbon.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedvirtual |
Create function for creating the geode for drawing this ribbon.
Reimplemented in makVrv::DtOsgParticleRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedvirtual |
Removes any existing drawables and add the drawable returned from getDrawable.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |