VR-Forces 4.1 Class Documentation
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtExtrudedLineModelSegmentInstance Class Reference

A prism controlled by control points. More...

Public Types

enum  LineExtrusionMode { LineOnly, ExtrudeWidth, ExtrudeHeight, FullExtrusion }

Public Member Functions

 DtExtrudedLineModelSegmentInstance (DtDe &de)
 CTOR.
virtual ~DtExtrudedLineModelSegmentInstance ()
 DTOR.
virtual void setStipplePattern (unsigned int, int repeatFactor)
 Sets the stipple pattern of the line.
virtual void getStipplePattern (unsigned int &, int &)
 Retrieves the stipple information.
virtual void setColor (const osg::Vec4 &)
 Set the color of the line.
virtual void getColor (float &r, float &g, float &b, float &a)
 Gets the color of the line.
virtual void setPoints (const DtVector &start, const DtVector &end)
 Sets the start/end point on the line. Will then create geometry for the line.
virtual void updatePoints (const DtVector &, const DtVector &)
virtual void setTextureHeight (double height)
 Set the height of the texture in meters.
virtual void setTextureWidth (double width)
 Set the width of the texture tiles in meters.
virtual void setTexture (osg::Texture *texture)
 Set the shape's texture.
virtual void setUpExtent (float height)
 Set the shape's upwards extrusion extent.
virtual void setDownExtent (float height)
 Set the shape's downwards extrusion extent.
virtual void setLeftExtent (float height)
 Set the shape's left extrusion extent.
virtual void setRightExtent (float heigh)
 Set the shape's right extrusion extent.
virtual void setWidth (float)
 Sets the width of the line. If there is height, will 0 out height.
virtual void setHeight (float)
 Sets the height of the line ("up/down" the origin point).
virtual void setLineWidth (float width)
 Sets the width of the line in pixel space, not world.
virtual void setScribed (bool b)
 Sets the line to be scribed (default true)
virtual void setScribeColor (const osg::Vec4 &)
 Sets the color of the scribe line.
virtual void setScribeOccluded (bool b)
 Sets the scribed line to be occluded by the terrain (default true)
virtual void setOcclusionEnabled (bool enabled)
 Turn on or off occlusion of the line by other objects; default is true.
virtual void setPickable (bool)
 Set the line's pickability.
bool pickable () const
 Get if the line is pickable.
osg::Node * rootNode ()
 Returns the root node.
void setOrigin (const DtVector &origin)
 Set the line's origin.
virtual void setSolid (bool)
 Sets shape solid or outlined only. If solid is false and scribed is false, line will be effectively invisible.
virtual void setEndArrow (bool)
 Sets the arrow to be on/off at the end of the segment (second point)
virtual bool endArrow () const
 Returns whether or not end arrow is set.
virtual void setStartArrow (bool)
 Sets the arrow to be on/off at the start of the segment (first point)
virtual bool startArrow () const
 Returns whether or not start arrow is set.
virtual void setArrowSize (double)
 Sets the size of the arrow (in pixels)
virtual void setArrowStyle (vrvTacticalGraphicUtilities::ArrowStyle)
 Sets the style of the arrow (see DtTacticalGraphicUtilities.h)

Protected Types

typedef std::vector< DtVectorPointVector

Protected Member Functions

virtual void updateMode ()
 Updates the line mode to a correct mode for the given extents.
virtual void updateTextureCoordinates ()
 Recalculate the texture coordinates.
virtual int addPointsForExtentExtrusion (const DtVector &point)
 Add points for a height or width extrustion.
virtual int addFaceForRotation (const osg::Quat &rotation, const DtVector &point)
 Adds a face given the rotation matrix.
virtual int addPointsForFullExtrusion (const DtVector &from, const DtVector &to)
 Add points for full extrustion.
virtual void updateStippling ()
 Updates for stippling.
virtual void updateScribeLine ()
 Updates the scribe line for geometry and color.
virtual void updateColors ()
 Updates colors of line and scribe line.
virtual bool frontAndBackFaceRendered () const
 Returns true if the first and last face are part of the line. Default is true.
virtual void updatePointsForLineStrip ()
 Updates the points for the line strip mode (no extrusion)
virtual void updatePointsForTriangleStrip ()
 Updates points for width or height extrusion.
virtual void updatePointsForExtrusion ()
 Updates points for full extrusion.
virtual void createFaces ()
 Creates the front/back face per segment for full extrusion.
virtual void updateScribeForTriangleStrip ()
 Updates script line for triangle strip mode.
virtual void updateScribeForExtrusion (osg::Vec3Array *)
 Updates scribe line for full extrusion mode.
virtual void updatePointsWithArrows ()
 If any segments want arrows, adds the points to draw arrows at those segment points.

Protected Attributes

osg::ref_ptr< osg::Geode > myShapeGeode
osg::ref_ptr< osg::Geometry > myShapeGeometry
osg::ref_ptr< osg::Vec3Array > myShapePoints
osg::ref_ptr< osg::Geode > myScribeGeode
osg::ref_ptr< osg::Geometry > myScribeGeometry
osg::ref_ptr< osg::Vec3Array > myScribePoints
osg::ref_ptr< osg::Texture > myTexture
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
osg::ref_ptr< osg::LineWidth > myLineWidth
osg::ref_ptr< osg::Group > myMainTransform
osg::ref_ptr< osg::Vec3Array > myFaces
 If the line has width and height, the list of faces that make up the junction points of the boxes.
osg::Vec4 myColor
double myTextureWidth
double myTextureHeight
float myUpExtent
float myDownExtent
float myLeftExtent
float myRightExtent
DtVector myStartPoint
DtVector myEndPoint
DtVector myOrigin
bool myStartArrow
bool myEndArrow
double myArrowSize
vrvTacticalGraphicUtilities::ArrowStyle myArrowStyle
PointVector myDrawPoints
bool myScribeOccluded
bool myScribed
bool mySolid
unsigned int myStipplePattern
int myRepeatFactor
LineExtrusionMode myMode
DtOsgSegmentPickablemyPickable
 If drawing as line use this pointer to create the pickable segments of that line, else geometry will not support it.
bool myIsPickable
osg::Vec4 myScribeColor
bool myScribeColorSet
DtDemyDe

Detailed Description

A prism controlled by control points.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator:
LineOnly 
ExtrudeWidth 

Draws a line without width or height.

ExtrudeHeight 

Draws a line with extruded width.

FullExtrusion 

Draws a line with extruded height.

Draws a line with both extruded width and height

Constructor & Destructor Documentation

makVrv::DtExtrudedLineModelSegmentInstance::DtExtrudedLineModelSegmentInstance ( DtDe de)

CTOR.

virtual makVrv::DtExtrudedLineModelSegmentInstance::~DtExtrudedLineModelSegmentInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setStipplePattern ( unsigned  int,
int  repeatFactor 
)
virtual

Sets the stipple pattern of the line.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::getStipplePattern ( unsigned int &  ,
int &   
)
virtual

Retrieves the stipple information.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setColor ( const osg::Vec4 &  )
virtual

Set the color of the line.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
)
virtual

Gets the color of the line.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setPoints ( const DtVector start,
const DtVector end 
)
virtual

Sets the start/end point on the line. Will then create geometry for the line.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updatePoints ( const DtVector ,
const DtVector  
)
virtual
virtual void makVrv::DtExtrudedLineModelSegmentInstance::setTextureHeight ( double  height)
virtual

Set the height of the texture in meters.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setTextureWidth ( double  width)
virtual

Set the width of the texture tiles in meters.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setTexture ( osg::Texture *  texture)
virtual

Set the shape's texture.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setUpExtent ( float  height)
virtual

Set the shape's upwards extrusion extent.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setDownExtent ( float  height)
virtual

Set the shape's downwards extrusion extent.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setLeftExtent ( float  height)
virtual

Set the shape's left extrusion extent.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setRightExtent ( float  heigh)
virtual

Set the shape's right extrusion extent.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setWidth ( float  )
virtual

Sets the width of the line. If there is height, will 0 out height.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setHeight ( float  )
virtual

Sets the height of the line ("up/down" the origin point).

If width is set, will 0 out width for the entire line

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setLineWidth ( float  width)
virtual

Sets the width of the line in pixel space, not world.

Clears out any existing dimensional size

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setScribed ( bool  b)
virtual

Sets the line to be scribed (default true)

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setScribeColor ( const osg::Vec4 &  )
virtual

Sets the color of the scribe line.

Once set it will always be different than the color of the main polygon

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setScribeOccluded ( bool  b)
virtual

Sets the scribed line to be occluded by the terrain (default true)

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setOcclusionEnabled ( bool  enabled)
virtual

Turn on or off occlusion of the line by other objects; default is true.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setPickable ( bool  )
virtual

Set the line's pickability.

bool makVrv::DtExtrudedLineModelSegmentInstance::pickable ( ) const

Get if the line is pickable.

osg::Node* makVrv::DtExtrudedLineModelSegmentInstance::rootNode ( )

Returns the root node.

void makVrv::DtExtrudedLineModelSegmentInstance::setOrigin ( const DtVector origin)

Set the line's origin.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setSolid ( bool  )
virtual

Sets shape solid or outlined only. If solid is false and scribed is false, line will be effectively invisible.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setEndArrow ( bool  )
virtual

Sets the arrow to be on/off at the end of the segment (second point)

virtual bool makVrv::DtExtrudedLineModelSegmentInstance::endArrow ( ) const
virtual

Returns whether or not end arrow is set.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setStartArrow ( bool  )
virtual

Sets the arrow to be on/off at the start of the segment (first point)

virtual bool makVrv::DtExtrudedLineModelSegmentInstance::startArrow ( ) const
virtual

Returns whether or not start arrow is set.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setArrowSize ( double  )
virtual

Sets the size of the arrow (in pixels)

virtual void makVrv::DtExtrudedLineModelSegmentInstance::setArrowStyle ( vrvTacticalGraphicUtilities::ArrowStyle  )
virtual

Sets the style of the arrow (see DtTacticalGraphicUtilities.h)

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateMode ( )
protectedvirtual

Updates the line mode to a correct mode for the given extents.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateTextureCoordinates ( )
protectedvirtual

Recalculate the texture coordinates.

virtual int makVrv::DtExtrudedLineModelSegmentInstance::addPointsForExtentExtrusion ( const DtVector point)
protectedvirtual

Add points for a height or width extrustion.

virtual int makVrv::DtExtrudedLineModelSegmentInstance::addFaceForRotation ( const osg::Quat &  rotation,
const DtVector point 
)
protectedvirtual

Adds a face given the rotation matrix.

virtual int makVrv::DtExtrudedLineModelSegmentInstance::addPointsForFullExtrusion ( const DtVector from,
const DtVector to 
)
protectedvirtual

Add points for full extrustion.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateStippling ( )
protectedvirtual

Updates for stippling.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateScribeLine ( )
protectedvirtual

Updates the scribe line for geometry and color.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateColors ( )
protectedvirtual

Updates colors of line and scribe line.

virtual bool makVrv::DtExtrudedLineModelSegmentInstance::frontAndBackFaceRendered ( ) const
protectedvirtual

Returns true if the first and last face are part of the line. Default is true.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updatePointsForLineStrip ( )
protectedvirtual

Updates the points for the line strip mode (no extrusion)

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updatePointsForTriangleStrip ( )
protectedvirtual

Updates points for width or height extrusion.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updatePointsForExtrusion ( )
protectedvirtual

Updates points for full extrusion.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::createFaces ( )
protectedvirtual

Creates the front/back face per segment for full extrusion.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateScribeForTriangleStrip ( )
protectedvirtual

Updates script line for triangle strip mode.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updateScribeForExtrusion ( osg::Vec3Array *  )
protectedvirtual

Updates scribe line for full extrusion mode.

virtual void makVrv::DtExtrudedLineModelSegmentInstance::updatePointsWithArrows ( )
protectedvirtual

If any segments want arrows, adds the points to draw arrows at those segment points.

Member Data Documentation

osg::ref_ptr<osg::Geode> makVrv::DtExtrudedLineModelSegmentInstance::myShapeGeode
protected
osg::ref_ptr<osg::Geometry> makVrv::DtExtrudedLineModelSegmentInstance::myShapeGeometry
protected
osg::ref_ptr<osg::Vec3Array> makVrv::DtExtrudedLineModelSegmentInstance::myShapePoints
protected
osg::ref_ptr<osg::Geode> makVrv::DtExtrudedLineModelSegmentInstance::myScribeGeode
protected
osg::ref_ptr<osg::Geometry> makVrv::DtExtrudedLineModelSegmentInstance::myScribeGeometry
protected
osg::ref_ptr<osg::Vec3Array> makVrv::DtExtrudedLineModelSegmentInstance::myScribePoints
protected
osg::ref_ptr<osg::Texture> makVrv::DtExtrudedLineModelSegmentInstance::myTexture
protected
osg::ref_ptr<osg::Vec2Array> makVrv::DtExtrudedLineModelSegmentInstance::myTextureCoordinates
protected
osg::ref_ptr<osg::LineWidth> makVrv::DtExtrudedLineModelSegmentInstance::myLineWidth
protected
osg::ref_ptr<osg::Group> makVrv::DtExtrudedLineModelSegmentInstance::myMainTransform
protected
osg::ref_ptr<osg::Vec3Array> makVrv::DtExtrudedLineModelSegmentInstance::myFaces
protected

If the line has width and height, the list of faces that make up the junction points of the boxes.

Each junction point is a series of four coordinates

osg::Vec4 makVrv::DtExtrudedLineModelSegmentInstance::myColor
protected
double makVrv::DtExtrudedLineModelSegmentInstance::myTextureWidth
protected
double makVrv::DtExtrudedLineModelSegmentInstance::myTextureHeight
protected
float makVrv::DtExtrudedLineModelSegmentInstance::myUpExtent
protected
float makVrv::DtExtrudedLineModelSegmentInstance::myDownExtent
protected
float makVrv::DtExtrudedLineModelSegmentInstance::myLeftExtent
protected
float makVrv::DtExtrudedLineModelSegmentInstance::myRightExtent
protected
DtVector makVrv::DtExtrudedLineModelSegmentInstance::myStartPoint
protected
DtVector makVrv::DtExtrudedLineModelSegmentInstance::myEndPoint
protected
DtVector makVrv::DtExtrudedLineModelSegmentInstance::myOrigin
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::myStartArrow
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::myEndArrow
protected
double makVrv::DtExtrudedLineModelSegmentInstance::myArrowSize
protected
vrvTacticalGraphicUtilities::ArrowStyle makVrv::DtExtrudedLineModelSegmentInstance::myArrowStyle
protected
PointVector makVrv::DtExtrudedLineModelSegmentInstance::myDrawPoints
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::myScribeOccluded
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::myScribed
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::mySolid
protected
unsigned int makVrv::DtExtrudedLineModelSegmentInstance::myStipplePattern
protected
int makVrv::DtExtrudedLineModelSegmentInstance::myRepeatFactor
protected
LineExtrusionMode makVrv::DtExtrudedLineModelSegmentInstance::myMode
protected
DtOsgSegmentPickable* makVrv::DtExtrudedLineModelSegmentInstance::myPickable
protected

If drawing as line use this pointer to create the pickable segments of that line, else geometry will not support it.

bool makVrv::DtExtrudedLineModelSegmentInstance::myIsPickable
protected
osg::Vec4 makVrv::DtExtrudedLineModelSegmentInstance::myScribeColor
protected
bool makVrv::DtExtrudedLineModelSegmentInstance::myScribeColorSet
protected
DtDe& makVrv::DtExtrudedLineModelSegmentInstance::myDe
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)