VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtOsgDecalRibbon Class Reference

OpenSceneGraph implementation of a textured ribbon Used to draw effects like tread tracks that follow a scene object Procedurally generated as its position in the scene changes.

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

Public Member Functions

virtual ~DtOsgDecalRibbon ()
 
virtual void setTextureRepeat (float textureRepeat)
 
- Public Member Functions inherited from 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)
 
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

 DtOsgDecalRibbon (DtDe &de, float segmentSpacing, const osg::Vec4 &color, osg::Texture *tex, float maxLength)
 
virtual void addParticle (const osg::Vec3d &left, const osg::Vec3d &right, double simTime) override
 
virtual float currentSegmentLength () override
 
virtual void cleanupOldSegments (double simTime) override
 
virtual void extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime) override
 
virtual osg::Drawable * getDrawable () override
 
virtual osg::Geode * createGeode () override
 
virtual int particleIndexAtOffset (int offset)
 
virtual void rotateDrawableIndices (int amount)
 
virtual osg::Vec2 getTextureCoordinateFor (int pointIndex, float vScale) const
 
- Protected Member Functions inherited from makVrv::DtOsgRibbon
virtual void setCurrentSegmentLength (float len)
 
virtual void setDrawable ()
 

Protected Attributes

osg::ref_ptr< osg::Vec3Array > myPoints
 
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
 
osg::ref_ptr
< osg::DrawElementsUInt > 
myRibbon
 
osg::ref_ptr< osg::Geometry > myGeometry
 
osg::ref_ptr< osg::Texture > myTexture
 
bool myWrappingVertices
 
std::string myTextureFilename
 
int myParticleIndex
 
float myTextureRepeat
 
- Protected Attributes inherited from makVrv::DtOsgRibbon
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
 
DtDemyDe
 
bool myLightingEnabled
 
bool myShaderSet
 
bool myHeightLinesEnabled
 
float myHeightLinesColor [4]
 
float myHeightLinesSpacing
 
DtModelSetId myHeightLinesModelSetId
 

Private Member Functions

 DtOsgDecalRibbon ()=delete
 
 DtOsgDecalRibbon (const DtOsgDecalRibbon &)=delete
 
DtOsgDecalRibbonoperator= (const DtOsgDecalRibbon &)=delete
 

Friends

class DtOsgDecalRibbonCreator
 

Constructor & Destructor Documentation

virtual makVrv::DtOsgDecalRibbon::~DtOsgDecalRibbon ( )
virtual

DTOR.

makVrv::DtOsgDecalRibbon::DtOsgDecalRibbon ( DtDe de,
float  segmentSpacing,
const osg::Vec4 &  color,
osg::Texture *  tex,
float  maxLength 
)
protected

CTOR (create through DtOsgDecalRibbonCreator method)

makVrv::DtOsgDecalRibbon::DtOsgDecalRibbon ( )
privatedelete

unimplemented private default constructor

makVrv::DtOsgDecalRibbon::DtOsgDecalRibbon ( const DtOsgDecalRibbon )
privatedelete

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

DtOsgDecalRibbon& makVrv::DtOsgDecalRibbon::operator= ( const DtOsgDecalRibbon )
privatedelete

Assignment Operator not implemented – Copy not allowed.

virtual void makVrv::DtOsgDecalRibbon::setTextureRepeat ( float  textureRepeat)
virtual

Set the number of copies of the texture to repeat into each quad. Textures are tiled in their v coordinate only.

virtual void makVrv::DtOsgDecalRibbon::addParticle ( const osg::Vec3d &  left,
const osg::Vec3d &  right,
double  simTime 
)
overrideprotectedvirtual

Add a particle to the ribbon.

Implements makVrv::DtOsgRibbon.

virtual float makVrv::DtOsgDecalRibbon::currentSegmentLength ( )
overrideprotectedvirtual

Find the length of the current ribbon segment.

Implements makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgDecalRibbon::cleanupOldSegments ( double  simTime)
overrideprotectedvirtual

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.

Implements makVrv::DtOsgRibbon.

virtual void makVrv::DtOsgDecalRibbon::extendCurrentSegment ( osg::Vec3d const &  left,
osg::Vec3d const &  right,
double  simTime 
)
overrideprotectedvirtual

Extend the current segment to left and right points.

Implements makVrv::DtOsgRibbon.

virtual osg::Drawable* makVrv::DtOsgDecalRibbon::getDrawable ( )
overrideprotectedvirtual

Create or get the ribbon drawable.

Implements makVrv::DtOsgRibbon.

virtual osg::Geode* makVrv::DtOsgDecalRibbon::createGeode ( )
overrideprotectedvirtual

Create the geode.

Reimplemented from makVrv::DtOsgRibbon.

virtual int makVrv::DtOsgDecalRibbon::particleIndexAtOffset ( int  offset)
protectedvirtual

Get index of particle at offset from current particle.

virtual void makVrv::DtOsgDecalRibbon::rotateDrawableIndices ( int  amount)
protectedvirtual

Rotate the drawable primitives' indices by amount.

virtual osg::Vec2 makVrv::DtOsgDecalRibbon::getTextureCoordinateFor ( int  pointIndex,
float  vScale 
) const
protectedvirtual

Get the texture coordinate for a vertex.

Friends And Related Function Documentation

friend class DtOsgDecalRibbonCreator
friend

Member Data Documentation

osg::ref_ptr<osg::Vec3Array> makVrv::DtOsgDecalRibbon::myPoints
protected
osg::ref_ptr<osg::Vec2Array> makVrv::DtOsgDecalRibbon::myTextureCoordinates
protected
osg::ref_ptr<osg::DrawElementsUInt> makVrv::DtOsgDecalRibbon::myRibbon
protected
osg::ref_ptr<osg::Geometry> makVrv::DtOsgDecalRibbon::myGeometry
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgDecalRibbon::myTexture
protected
bool makVrv::DtOsgDecalRibbon::myWrappingVertices
protected
std::string makVrv::DtOsgDecalRibbon::myTextureFilename
protected
int makVrv::DtOsgDecalRibbon::myParticleIndex
protected
float makVrv::DtOsgDecalRibbon::myTextureRepeat
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)