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

Helper class to draw a styleable line segment; generates a geode containing the line segment geometry.

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

Classes

struct  LineSegmentState
 

Public Member Functions

 Dt3DLineModelInstanceSegment ()
 
virtual ~Dt3DLineModelInstanceSegment ()
 
virtual void setStartPoint (const osg::Vec3d &startPoint)
 
virtual void setEndPoint (const osg::Vec3d &endPoint)
 
const osg::Vec3d & startPoint () const
 
const osg::Vec3d & endPoint () const
 
virtual void setColor (const osg::Vec4 &color)
 
virtual void setVertexColor (unsigned int vertexIndex, const osg::Vec4 &color)
 
virtual void setStartArrow (bool arrowEnabled)
 
virtual void setEndArrow (bool arrowEnabled)
 
virtual void setLightningStyle (bool lightningStyle)
 
virtual void setWidth (double width)
 
virtual double width () const
 
virtual void setStipplePattern (unsigned int stipplePattern, int repeatFactor)
 
virtual osg::Node * rootNode ()
 
const std::vector< osg::Vec3 > & pickableVertices () const
 
virtual void update ()
 
virtual void updateGeometry ()
 
- Public Member Functions inherited from makVrv::Dt3DLineModelInstanceSegmentInterface
 Dt3DLineModelInstanceSegmentInterface ()
 
virtual ~Dt3DLineModelInstanceSegmentInterface ()
 

Protected Member Functions

virtual void build ()
 
virtual void calculateArrowVertices (const osg::Vec3d &segmentStart, const osg::Vec3d &segmentEnd, osg::Vec3d &arrowStartOut, osg::Vec3d &arrowEndOut)
 
virtual void buildVertices ()
 
virtual void buildLinePrimitive ()
 
virtual void buildPickableVertices ()
 
virtual void buildColorArray ()
 
virtual unsigned int startArrowVertexIndex ()
 
virtual unsigned int endArrowVertexIndex ()
 
virtual unsigned int lightningVertexIndex ()
 

Protected Attributes

LineSegmentState myState
 
bool myGeometryDirty
 
bool myIndexBufferDirty
 
osg::ref_ptr< osg::Billboard > myGeode
 
osg::ref_ptr< osg::Geometry > myGeometry
 
osg::ref_ptr< osg::Vec3Array > myPickableVertices
 
osg::ref_ptr< osg::Vec3Array > myVertexArray
 
osg::ref_ptr< osg::Vec4Array > myColorArray
 
osg::ref_ptr
< osg::DrawElementsUInt > 
myLinePrimitive
 

Constructor & Destructor Documentation

makVrv::Dt3DLineModelInstanceSegment::Dt3DLineModelInstanceSegment ( )

CTOR.

virtual makVrv::Dt3DLineModelInstanceSegment::~Dt3DLineModelInstanceSegment ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::Dt3DLineModelInstanceSegment::setStartPoint ( const osg::Vec3d &  startPoint)
virtual

Set the location of the segment's start point.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::setEndPoint ( const osg::Vec3d &  endPoint)
virtual

Set the location of the segment's end point.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

const osg::Vec3d& makVrv::Dt3DLineModelInstanceSegment::startPoint ( ) const
inline
const osg::Vec3d& makVrv::Dt3DLineModelInstanceSegment::endPoint ( ) const
inline
virtual void makVrv::Dt3DLineModelInstanceSegment::setColor ( const osg::Vec4 &  color)
virtual

Set the segment's color.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::setVertexColor ( unsigned int  vertexIndex,
const osg::Vec4 &  color 
)
virtual

Set the color of one end of the segment.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::setStartArrow ( bool  arrowEnabled)
virtual

Turn on or off the arrow at the segment's start point.

virtual void makVrv::Dt3DLineModelInstanceSegment::setEndArrow ( bool  arrowEnabled)
virtual

Turn on or off the arrow at the segment's end point.

virtual void makVrv::Dt3DLineModelInstanceSegment::setLightningStyle ( bool  lightningStyle)
virtual

Turn on or off lightning bolt style.

virtual void makVrv::Dt3DLineModelInstanceSegment::setWidth ( double  width)
virtual

Set the segment width in pixels.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual double makVrv::Dt3DLineModelInstanceSegment::width ( ) const
virtual

Get the segment width in pixels.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::setStipplePattern ( unsigned int  stipplePattern,
int  repeatFactor 
)
virtual

Set the line's stipple pattern.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual osg::Node* makVrv::Dt3DLineModelInstanceSegment::rootNode ( )
virtual

Get the node containing the line geometry.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

const std::vector<osg::Vec3>& makVrv::Dt3DLineModelInstanceSegment::pickableVertices ( ) const
virtual

Get the vertex list for this segment's pickable.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::update ( )
virtual

Indicate that its time to prepare actual scene graph data to be rendered.

Implements makVrv::Dt3DLineModelInstanceSegmentInterface.

virtual void makVrv::Dt3DLineModelInstanceSegment::updateGeometry ( )
virtual

Update all the geometry for this segment.

virtual void makVrv::Dt3DLineModelInstanceSegment::build ( )
protectedvirtual

Build the line segment geometry.

virtual void makVrv::Dt3DLineModelInstanceSegment::calculateArrowVertices ( const osg::Vec3d &  segmentStart,
const osg::Vec3d &  segmentEnd,
osg::Vec3d &  arrowStartOut,
osg::Vec3d &  arrowEndOut 
)
protectedvirtual

Helper function to calculate the vertices of an arrowhead (the arrowhead is arrowStartOut->segmentStart->arrowEndOut) arrowStartOut and arrowEndOut are output parameters.

Reimplemented in makVrf::DtVrf3DLineModelInstanceSegment.

virtual void makVrv::Dt3DLineModelInstanceSegment::buildVertices ( )
protectedvirtual

Build and set the vertex array for the line segment geometry.

virtual void makVrv::Dt3DLineModelInstanceSegment::buildLinePrimitive ( )
protectedvirtual

Build and set the line primitive for the geometry.

virtual void makVrv::Dt3DLineModelInstanceSegment::buildPickableVertices ( )
protectedvirtual

Build the vertices necessary to populate the pickable object.

virtual void makVrv::Dt3DLineModelInstanceSegment::buildColorArray ( )
protectedvirtual

Build and set the color array for the geometry.

virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::startArrowVertexIndex ( )
protectedvirtual

Get the index of the first vertex in the start arrow. The second is at startArrowVertexIndex() + 1. Returns an arbitrary value the arrow is off.

virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::endArrowVertexIndex ( )
protectedvirtual

Get the index of the first vertex in the end arrow. The second is at endArrowVertexIndex() + 1. Returns an arbitrary value if the arrow is off.

virtual unsigned int makVrv::Dt3DLineModelInstanceSegment::lightningVertexIndex ( )
protectedvirtual

Get the index of the first vertex of the lightning points. The second is at lightningVertexIndex() + 1 Returns an arbitrary value if lightning is off.

Member Data Documentation

LineSegmentState makVrv::Dt3DLineModelInstanceSegment::myState
protected
bool makVrv::Dt3DLineModelInstanceSegment::myGeometryDirty
protected
bool makVrv::Dt3DLineModelInstanceSegment::myIndexBufferDirty
protected
osg::ref_ptr<osg::Billboard> makVrv::Dt3DLineModelInstanceSegment::myGeode
protected
osg::ref_ptr<osg::Geometry> makVrv::Dt3DLineModelInstanceSegment::myGeometry
protected
osg::ref_ptr<osg::Vec3Array> makVrv::Dt3DLineModelInstanceSegment::myPickableVertices
protected
osg::ref_ptr<osg::Vec3Array> makVrv::Dt3DLineModelInstanceSegment::myVertexArray
protected
osg::ref_ptr<osg::Vec4Array> makVrv::Dt3DLineModelInstanceSegment::myColorArray
protected
osg::ref_ptr<osg::DrawElementsUInt> makVrv::Dt3DLineModelInstanceSegment::myLinePrimitive
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)