VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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. More...

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

Classes

struct  LineSegmentState
 Structure to contain the line segment's state. More...

Public Member Functions

 Dt3DLineModelInstanceSegment ()
 CTOR.
 ~Dt3DLineModelInstanceSegment ()
 DTOR.
virtual void setStartPoint (const osg::Vec3d &startPoint)
 Set the location of the segment's start point.
virtual void setEndPoint (const osg::Vec3d &endPoint)
 Set the location of the segment's end point.
const osg::Vec3d & startPoint () const
const osg::Vec3d & endPoint () const
virtual void setColor (const osg::Vec4 &color)
 Set the segment's color.
virtual void setVertexColor (unsigned int vertexIndex, const osg::Vec4 &color)
 Set the color of one end of the segment.
virtual void setStartArrow (bool arrowEnabled)
 Turn on or off the arrow at the segment's start point.
virtual void setEndArrow (bool arrowEnabled)
 Turn on or off the arrow at the segment's end point.
virtual void setLightningStyle (bool lightningStyle)
 Turn on or off lightning bolt style.
virtual void setWidth (double width)
 Set the segment width in pixels.
virtual double width () const
 Get the segment width in pixels.
virtual void setStipplePattern (unsigned int stipplePattern, int repeatFactor)
 Set the line's stipple pattern.
virtual osg::Node * rootNode ()
 Get the node containing the line geometry.
const std::vector< osg::Vec3 > & pickableVertices () const
 Get the vertex list for this segment's pickable.
virtual void update ()
 Indicate that its time to prepare actual scene graph data to be rendered.
virtual void updateGeometry ()
 Update all the geometry for this segment.
- Public Member Functions inherited from makVrv::Dt3DLineModelInstanceSegmentInterface
 Dt3DLineModelInstanceSegmentInterface ()
 CTOR.
virtual ~Dt3DLineModelInstanceSegmentInterface ()
 DTOR.

Protected Member Functions

virtual void build ()
 Build the line segment geometry.
virtual void calculateArrowVertices (const osg::Vec3d &segmentStart, const osg::Vec3d &segmentEnd, osg::Vec3d &arrowStartOut, osg::Vec3d &arrowEndOut)
 Helper function to calculate the vertices of an arrowhead (the arrowhead is arrowStartOut->segmentStart->arrowEndOut) arrowStartOut and arrowEndOut are output parameters.
virtual void buildVertices ()
 Build and set the vertex array for the line segment geometry.
virtual void buildLinePrimitive ()
 Build and set the line primitive for the geometry.
virtual void buildPickableVertices ()
 Build the vertices necessary to populate the pickable object.
virtual void buildColorArray ()
 Build and set the color array for the geometry.
virtual unsigned int startArrowVertexIndex ()
 Get the index of the first vertex in the start arrow.
virtual unsigned int endArrowVertexIndex ()
 Get the index of the first vertex in the end arrow.
virtual unsigned int lightningVertexIndex ()
 Get the index of the first vertex of the lightning points.

Protected Attributes

LineSegmentState myState
bool myGeometryDirty
osg::ref_ptr< osg::Billboard > myGeode
osg::ref_ptr< osg::Geometry > myGeometry
osg::ref_ptr< osg::Vec3Array > myPickableVertices

Detailed Description

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

Constructor & Destructor Documentation

makVrv::Dt3DLineModelInstanceSegment::Dt3DLineModelInstanceSegment ( )

CTOR.

makVrv::Dt3DLineModelInstanceSegment::~Dt3DLineModelInstanceSegment ( )

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.

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
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

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)