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

Public Member Functions | |
| DtOsgRibbon () | |
| Default CTOR. | |
| DtOsgRibbon (float segmentSpacing, const osg::Vec4 &color, float maxLength=2000) | |
| CTOR. | |
| virtual | ~DtOsgRibbon () |
| DTOR. | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Interrupt CullVisitors by updating the ribbon. | |
| virtual osg::Node * | node () |
| Get the osg geometry node associated with the ribbon. | |
| virtual void | setColor (const osg::Vec4 &color) |
| Set the ribbon's color. | |
| const osg::Vec4 & | color () const |
| Get the ribbon's color. | |
| virtual void | setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB) |
| Set the points to drop in local coordinates. | |
| virtual void | update (double dt, double simTime) |
| Update the ribbon with the current position. | |
| virtual void | update () |
| optional time independent update method. | |
| virtual void | setMaxSegments (long segments) |
| Sets the maximum number of segments allowed in the ribbon. | |
| long | maxSegments () const |
| Gets the maximum number of segments allowed in the ribbon. | |
| virtual void | setSegmentSpacing (float spacing) |
| Sets the maximum length of ribbon segments. | |
| float | segmentSpacing () const |
| Gets the maximum length of the ribbon segments. | |
Protected Member Functions | |
| virtual void | addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| Add a particle to the ribbon. | |
| virtual float | currentSegmentLength ()=0 |
| Find the length of the current ribbon segment. | |
| virtual void | extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| Extend the current segment to left and right points. | |
| virtual osg::Drawable * | getDrawable ()=0 |
| Get the drawable responsible for drawing the ribbon. | |
| virtual osg::Geode * | createGeode () |
| Create function for creating the geode for drawing this ribbon. | |
| virtual void | setDrawable () |
| Removes any existing drawables and add the drawable returned from getDrawable. | |
Private 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 |
| osg::Vec3d | myLocalPointA |
| osg::Vec3d | myLocalPointB |
| osg::Vec4 | myColor |
| bool | myFirstUpdate |
Base class for OSG ribbon implementations.
Default CTOR.
| makVrv::DtOsgRibbon::DtOsgRibbon | ( | float | segmentSpacing, |
| const osg::Vec4 & | color, | ||
| float | maxLength = 2000 |
||
| ) |
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 makVrv::DtOsgRibbon::~DtOsgRibbon | ( | ) | [virtual] |
DTOR.
| virtual void makVrv::DtOsgRibbon::traverse | ( | osg::NodeVisitor & | nv | ) | [virtual] |
Interrupt CullVisitors by updating the ribbon.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
| virtual osg::Node* makVrv::DtOsgRibbon::node | ( | ) | [virtual] |
Get the osg geometry node associated with the ribbon.
Reimplemented in makVrv::DtOsgMultiRibbon.
| virtual void makVrv::DtOsgRibbon::setColor | ( | const osg::Vec4 & | color | ) | [virtual] |
Set the ribbon's color.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
| const osg::Vec4& makVrv::DtOsgRibbon::color | ( | ) | const [inline] |
Get the ribbon's color.
| virtual void makVrv::DtOsgRibbon::setDroppedPoints | ( | const osg::Vec3d & | pointA, |
| const osg::Vec3d & | pointB | ||
| ) | [virtual] |
Set the points to drop in local coordinates.
| virtual void makVrv::DtOsgRibbon::update | ( | double | dt, |
| double | simTime | ||
| ) | [virtual] |
Update the ribbon with the current position.
Reimplemented in makVrv::DtOsgMultiRibbon, and makVrv::DtOsgParticleRibbon.
| virtual void makVrv::DtOsgRibbon::update | ( | ) | [inline, virtual] |
optional time independent update method.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
| virtual void makVrv::DtOsgRibbon::setMaxSegments | ( | long | segments | ) | [virtual] |
Sets the maximum number of segments allowed in the ribbon.
Reimplemented in makVrv::DtOsgTrackHistoryRibbon.
| long makVrv::DtOsgRibbon::maxSegments | ( | ) | const [inline] |
Gets the maximum number of segments allowed in the ribbon.
| virtual void makVrv::DtOsgRibbon::setSegmentSpacing | ( | float | spacing | ) | [virtual] |
Sets the maximum length of ribbon segments.
| float makVrv::DtOsgRibbon::segmentSpacing | ( | ) | const [inline] |
Gets the maximum length of the ribbon segments.
| virtual void makVrv::DtOsgRibbon::addParticle | ( | osg::Vec3d const & | left, |
| osg::Vec3d const & | right, | ||
| double | simTime | ||
| ) | [protected, pure virtual] |
Add a particle to the ribbon.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
| virtual float makVrv::DtOsgRibbon::currentSegmentLength | ( | ) | [protected, pure virtual] |
Find the length of the current ribbon segment.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
| virtual void makVrv::DtOsgRibbon::extendCurrentSegment | ( | osg::Vec3d const & | left, |
| osg::Vec3d const & | right, | ||
| double | simTime | ||
| ) | [protected, pure virtual] |
Extend the current segment to left and right points.
Implemented in makVrv::DtOsgParticleRibbon, makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
| virtual osg::Drawable* makVrv::DtOsgRibbon::getDrawable | ( | ) | [protected, pure virtual] |
Get the drawable responsible for drawing the ribbon.
Implemented in makVrv::DtOsgTrackHistoryRibbon, makVrv::DtOsgParticleRibbon, makVrv::DtOsgMultiRibbon, and makVrv::DtOsgDecalRibbon.
| virtual osg::Geode* makVrv::DtOsgRibbon::createGeode | ( | ) | [protected, virtual] |
Create function for creating the geode for drawing this ribbon.
Reimplemented in makVrv::DtOsgParticleRibbon, and makVrv::DtOsgDecalRibbon.
| virtual void makVrv::DtOsgRibbon::setDrawable | ( | ) | [protected, virtual] |
Removes any existing drawables and add the drawable returned from getDrawable.
osg::ref_ptr<osg::MatrixTransform> makVrv::DtOsgRibbon::myPositionNode [private] |
osg::ref_ptr<osg::Geode> makVrv::DtOsgRibbon::myGeode [private] |
osg::Matrixd makVrv::DtOsgRibbon::myWorldTransformInv [private] |
osg::Matrixd makVrv::DtOsgRibbon::myLastLocalToWork [private] |
int makVrv::DtOsgRibbon::myLastUpdatedFrame [private] |
double makVrv::DtOsgRibbon::myLastUpdateTime [private] |
Reimplemented in makVrv::DtOsgParticleRibbon.
long makVrv::DtOsgRibbon::myMaxSegments [private] |
float makVrv::DtOsgRibbon::mySegmentSpacingSquared [private] |
float makVrv::DtOsgRibbon::mySegmentSpacing [private] |
osg::Vec3d makVrv::DtOsgRibbon::myLocalPointA [private] |
osg::Vec3d makVrv::DtOsgRibbon::myLocalPointB [private] |
osg::Vec4 makVrv::DtOsgRibbon::myColor [private] |
bool makVrv::DtOsgRibbon::myFirstUpdate [private] |