VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgTrackHistoryRibbon Class Reference

OSG implementation of a track history ribbon. More...

Inheritance diagram for makVrv::DtOsgTrackHistoryRibbon:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtOsgTrackHistoryRibbon (DtDe &de, float segmentSpacing, const osg::Vec4 &color, float maxLength)
 CTOR.
virtual ~DtOsgTrackHistoryRibbon ()
 DTOR.
virtual void traverse (osg::NodeVisitor &nv)
 Override default traverse to remove update behavior.
virtual void setMaxSegments (long segments)
 Sets the max number of segments in the ribbon.

Protected Member Functions

virtual void addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Add a particle to the ribbon.
virtual float currentSegmentLength ()
 Find the length of the current ribbon segment.
virtual void extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)
 Extend the current segment to left and right points.
virtual osg::Drawable * getDrawable ()
 Create or get the ribbon drawable.
virtual int particleIndexAtOffset (int offset)
 Get index of particle at offset from current particle.
virtual void update ()
 Calls DtOsgRibbon::update(double,double).
virtual void setColor (const osg::Vec4 &color)
 Change the geometry color.

Protected Attributes

DtDemyDe
osg::ref_ptr< osg::Vec3Array > myPoints
osg::ref_ptr
< DtSharedDrawElementsUInt
myRibbon
osg::ref_ptr
< DtSharedDrawElementsUInt
myBottomLine
osg::ref_ptr
< DtSharedDrawElementsUInt
myTopLine
osg::ref_ptr< osg::Geometry > myGeometry
int myParticleIndex

Detailed Description

OSG implementation of a track history ribbon.


Constructor & Destructor Documentation

makVrv::DtOsgTrackHistoryRibbon::DtOsgTrackHistoryRibbon ( DtDe de,
float  segmentSpacing,
const osg::Vec4 &  color,
float  maxLength 
)

CTOR.

Parameters:
dethe DtDe the ribbon belongs to.
segmentSpacingthe spacing between segments (in meters).
colorthe color of the ribbon.
maxLengththe max length of the ribbon (in segments).

DTOR.


Member Function Documentation

virtual void makVrv::DtOsgTrackHistoryRibbon::traverse ( osg::NodeVisitor &  nv) [virtual]

Override default traverse to remove update behavior.

Reimplemented from makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgTrackHistoryRibbon::setMaxSegments ( long  segments) [virtual]

Sets the max number of segments in the ribbon.

Overridden from DtOsgRibbon to destroy the ribbon geometry and force re-creation when the max segment count changes.

Reimplemented from makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgTrackHistoryRibbon::addParticle ( osg::Vec3d const &  left,
osg::Vec3d const &  right,
double  simTime 
) [protected, virtual]

Add a particle to the ribbon.

Implements makVrv::DtOsgRibbon.

virtual float makVrv::DtOsgTrackHistoryRibbon::currentSegmentLength ( ) [protected, virtual]

Find the length of the current ribbon segment.

Implements makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgTrackHistoryRibbon::extendCurrentSegment ( osg::Vec3d const &  left,
osg::Vec3d const &  right,
double  simTime 
) [protected, virtual]

Extend the current segment to left and right points.

Implements makVrv::DtOsgRibbon.

virtual osg::Drawable* makVrv::DtOsgTrackHistoryRibbon::getDrawable ( ) [protected, virtual]

Create or get the ribbon drawable.

Overridden from DtOsgRibbon to create the ribbon geometry.

Returns:
the ribbon geometry (creating it on first call).

Implements makVrv::DtOsgRibbon.

virtual int makVrv::DtOsgTrackHistoryRibbon::particleIndexAtOffset ( int  offset) [protected, virtual]

Get index of particle at offset from current particle.

virtual void makVrv::DtOsgTrackHistoryRibbon::update ( ) [protected, virtual]

Calls DtOsgRibbon::update(double,double).

Passes zero for both parameters (dt and simTime).

Reimplemented from makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgTrackHistoryRibbon::setColor ( const osg::Vec4 &  color) [protected, virtual]

Change the geometry color.

Reimplemented from makVrv::DtOsgRibbon.


Member Data Documentation

osg::ref_ptr<osg::Vec3Array> makVrv::DtOsgTrackHistoryRibbon::myPoints [protected]
osg::ref_ptr<osg::Geometry> makVrv::DtOsgTrackHistoryRibbon::myGeometry [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)