![]() |
VR-Forces 4.10 Class Documentation
|
Base class for OSG ribbon implementations. More...

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) | |
| CTOR. More... | |
| virtual | ~DtOsgRibbon () |
| DTOR. More... | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Interrupt CullVisitors by updating the ribbon. More... | |
| virtual osg::Node * | node () |
| Get the osg geometry node associated with the ribbon. More... | |
| virtual void | setColor (const osg::Vec4 &color) |
| Set the ribbon's color. More... | |
| virtual const osg::Vec4 & | color () const |
| Get the ribbon's color. More... | |
| virtual void | setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB) |
| Set the points to drop in local coordinates. More... | |
| virtual void | setDroppedPointsPositionOffset (const osg::Vec3d &posOffset) |
| Provide an offset to the dropped points so the entity can shift around the points specified in the model definition ex. More... | |
| virtual void | update (double dt, double simTime) |
| Update the ribbon with the current position. More... | |
| virtual void | update () |
| Optional time independent update method. More... | |
| virtual void | setMaxSegments (long segments) |
| Sets the maximum number of segments allowed in the ribbon. More... | |
| virtual long | maxSegments () const |
| Gets the maximum number of segments allowed in the ribbon. More... | |
| virtual void | setSegmentSpacing (float spacing) |
| Sets the maximum length of ribbon segments. More... | |
| virtual void | setSegmentTimeout (float duration) |
| Sets the timeout of a ribbon segment. More... | |
| virtual float | segmentSpacing () const |
| Gets the maximum length of the ribbon segments. More... | |
| virtual void | setStippled (bool stippled) |
| virtual bool | isStippled () const |
| Get the stipple setting for this ribbon. More... | |
| virtual void | setLightingEnabled (bool enable) |
| set to true the lighting enabled flag to turn lighting on for the ribbon More... | |
| virtual bool | lightingEnabled () |
| get the lighting enabled flag More... | |
Protected Member Functions | |
| virtual void | addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| Add a particle to the ribbon. More... | |
| virtual float | currentSegmentLength ()=0 |
| Find the length of the current ribbon segment. More... | |
| virtual void | cleanupOldSegments (double simTime)=0 |
| Check to see if any segments have reached their timeout if so remove them from the list to be rendered. More... | |
| virtual void | extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| Extend the current segment to left and right points. More... | |
| virtual osg::Drawable * | getDrawable ()=0 |
| Get the drawable responsible for drawing the ribbon. More... | |
| virtual osg::Geode * | createGeode () |
| Create function for creating the geode for drawing this ribbon. More... | |
| virtual void | setDrawable () |
| Removes any existing drawables and add the drawable returned from getDrawable. More... | |
Protected Attributes | |
| osg::ref_ptr < osg::MatrixTransform > | myPositionNode |
| osg::ref_ptr< osg::Geode > | myGeode |
| osg::Matrixd | myWorldTransformInv |
| osg::Matrixd | myLastLocalToWork |
| int | myLastUpdatedFrame |
| double | myLastUpdateTime |
| long | myMaxSegments |
| 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 |
Private Member Functions | |
| DtOsgRibbon ()=delete | |
| unimplemented private default constructor More... | |
| DtOsgRibbon (const DtOsgRibbon &)=delete | |
| Copy Constructor not implemented – Copy not allowed. More... | |
| DtOsgRibbon & | operator= (const DtOsgRibbon &)=delete |
| Assignment Operator not implemented – Copy not allowed. More... | |
Base class for OSG ribbon implementations.
| 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.
|
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
|
protectedpure virtual |
Add a particle to the ribbon.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Find the length of the current ribbon segment.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
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 makVrf::DtVrfOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Extend the current segment to left and right points.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, makVrv::DtOsgTrackHistoryRibbon, and makVrv::DtOsgDecalRibbon.
|
protectedpure virtual |
Get the drawable responsible for drawing the ribbon.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, 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 |