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 Types | Protected Member Functions | Protected Attributes
makVrv::DtOsgWindowLineInstance Class Reference

OSG Implementation of a DtWindowLineInstance. Uses a vrvGraphics DtSegmentedLine to draw a 2D Line.

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

Classes

struct  SegmentAttributes
 

Public Member Functions

 DtOsgWindowLineInstance (DtDe &de)
 
virtual ~DtOsgWindowLineInstance ()
 
virtual void setVertex (unsigned int vertex, double x, double y)
 
virtual void removeVertex (unsigned int vertex)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void setStipplePattern (unsigned int stipplePattern)
 
virtual void setWidth (unsigned int width)
 
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 
virtual void setSegmentColor (unsigned int index, float r, float g, float b, float a)
 
virtual void setSegmentStartColor (unsigned int index, float r, float g, float b, float a)
 
virtual void setSegmentEndColor (unsigned int index, float r, float g, float b, float a)
 
virtual void setSegmentLightningStyle (unsigned int index, bool enableLightningStyle)
 
virtual void setSegmentStartArrow (unsigned int index, bool enableStartArrow)
 
virtual void setSegmentEndArrow (unsigned int index, bool enableEndArrow)
 
virtual void setSegmentStipplePattern (unsigned int index, unsigned int stippleScale, unsigned int stipplePattern)
 
virtual void setSegmentWidth (unsigned int index, unsigned int width)
 
virtual void setVisible (bool isVisible)
 
virtual void update ()
 
virtual void setTransform (DtMatrix3< double > transform)
 
virtual void createLine ()
 
virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 
virtual void setGroup (int groupId)
 
- Public Member Functions inherited from makVrv::DtWindowLineInstance
virtual ~DtWindowLineInstance ()
 
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()
 

Protected Types

typedef std::vector
< SegmentAttributes
SegmentAttributesVector
 
typedef std::vector< osg::Vec2 > Points
 

Protected Member Functions

virtual void resizeSegmentAttributes (int size)
 
virtual void updateSegments ()
 
virtual void updateGeometry ()
 
virtual void generateSegment (int segmentIndex, const osg::Vec2 &startPoint, const osg::Vec2 &endPoint, const osg::Vec2 &segmentAxis, const osg::Vec2 &segmentPerpendicular)
 
virtual void setupColorRanges (SegmentAttributes *segmentAttributes)
 
virtual void setLineSegmentColors (unsigned int vtx, SegmentAttributes *segmentAttributes)
 
virtual void setChannelOverlay (const std::string &displayName, const std::string &windowName, const std::string &channelName) override
 
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 

Protected Attributes

DtDemyDe
 
Points myPoints
 
Points myVertices
 
SegmentAttributesVector mySegmentAttributes
 
DtSegmentedLinemyLine
 
osg::Vec4 myColor
 
float myWidth
 
unsigned int myStipplePattern
 
unsigned int myGroup
 
std::vector< doublemySegmentPercentages
 
bool myGeometryDirty
 
bool mySegmentsDirty
 
bool myUseChannelOverlay
 
bool myVisible
 
osg::Matrix myTransform
 
osg::Vec2 myClipBoxBottomLeft
 
osg::Vec2 myClipBoxTopRight
 
std::string myDisplayName
 
std::string myWindowName
 
std::string myChannelName
 
DtSignalConnectionManager myConnections
 

Member Typedef Documentation

typedef std::vector<osg::Vec2> makVrv::DtOsgWindowLineInstance::Points
protected

Constructor & Destructor Documentation

makVrv::DtOsgWindowLineInstance::DtOsgWindowLineInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowLineInstance::~DtOsgWindowLineInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowLineInstance::setVertex ( unsigned int  vertex,
double  x,
double  y 
)
virtual

Set (or add) the specified vertex at <x,y>

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::removeVertex ( unsigned int  vertex)
virtual

Remove the specified vertex.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the entire line color.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setStipplePattern ( unsigned int  stipplePattern)
virtual

Set the entire line stipple pattern.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setWidth ( unsigned int  width)
virtual

Set the entire line width.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setStyleSegments ( const std::vector< double > &  segmentPercentages)
virtual

Set the percentage lengths of the segments; creates and removes segments as necessary.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of a segment.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStartColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the firt vertex in a segment. This can be used for color blending between vertices.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentEndColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the second vertex in a segment. This can be used for color blending between vertices.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentLightningStyle ( unsigned int  index,
bool  enableLightningStyle 
)
virtual

Set a segment's lightning style (whether or not it looks like a lighting bolt)

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStartArrow ( unsigned int  index,
bool  enableStartArrow 
)
virtual

Turn on or off a segment's start arrow.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentEndArrow ( unsigned int  index,
bool  enableEndArrow 
)
virtual

Turn on or off a segment's end arrow.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentStipplePattern ( unsigned int  index,
unsigned int  stippleScale,
unsigned int  stipplePattern 
)
virtual

Set the stipple pattern for a segment according to the OpenGL line stipple feature.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setSegmentWidth ( unsigned int  index,
unsigned int  width 
)
virtual

Set the width of a segment in pixels.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setVisible ( bool  isVisible)
virtual

Set the line visible or invisible.

Implements makVrv::DtSetVisibilityInterface.

Reimplemented in makVrv::DtOsgWindowLineGroupInstance.

virtual void makVrv::DtOsgWindowLineInstance::update ( )
virtual

Called on signal_postUpdate; time to update render data.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setTransform ( DtMatrix3< double transform)
virtual

Sets the line's transform matrix, used to update the position and clockwise rotation of the vertices.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::createLine ( )
virtual

Creates the line model.

virtual void makVrv::DtOsgWindowLineInstance::setClipBox ( DtVector2< double bottomLeftLocation,
DtVector2< double topRightLocation 
)
virtual

Set this objects clip box bounds.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::setGroup ( int  groupId)
virtual

Set this object's group ID for z order. The higher the Z order the "closer" the element will be drawn to the eye point.

Implements makVrv::DtWindowLineInstance.

virtual void makVrv::DtOsgWindowLineInstance::resizeSegmentAttributes ( int  size)
protectedvirtual

Add segments to the segments attribute vector.

virtual void makVrv::DtOsgWindowLineInstance::updateSegments ( )
protectedvirtual

Updates the segment information.

virtual void makVrv::DtOsgWindowLineInstance::updateGeometry ( )
protectedvirtual

Updates the lines geometry.

Reimplemented in makVrv::DtOsgWindowLineGroupInstance.

virtual void makVrv::DtOsgWindowLineInstance::generateSegment ( int  segmentIndex,
const osg::Vec2 &  startPoint,
const osg::Vec2 &  endPoint,
const osg::Vec2 &  segmentAxis,
const osg::Vec2 &  segmentPerpendicular 
)
protectedvirtual

Generate vertices for a single segment.

virtual void makVrv::DtOsgWindowLineInstance::setupColorRanges ( SegmentAttributes segmentAttributes)
protectedvirtual

Determine the sub-segment range for each segment color specified.

virtual void makVrv::DtOsgWindowLineInstance::setLineSegmentColors ( unsigned int  vtx,
SegmentAttributes segmentAttributes 
)
protectedvirtual

Sets the point colors for the line segments based on the features and colors provided in segmentAttributes.

virtual void makVrv::DtOsgWindowLineInstance::setChannelOverlay ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName 
)
overrideprotectedvirtual

By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword. If a user wishes to draw a specific window object on a specific channel, use this method. This does not work for remote displays.

Implements makVrv::DtWindowLineInstance.

Reimplemented in makVrv::DtOsgWindowLineGroupInstance.

virtual void makVrv::DtOsgWindowLineInstance::slot_channelToBeDestroyed ( DtChannelManager ,
DtChannel  
)
protectedvirtual

Destroy the line when the channel its being rendered on is going to be destroyed.

Member Data Documentation

DtDe& makVrv::DtOsgWindowLineInstance::myDe
protected
Points makVrv::DtOsgWindowLineInstance::myPoints
protected
Points makVrv::DtOsgWindowLineInstance::myVertices
protected
SegmentAttributesVector makVrv::DtOsgWindowLineInstance::mySegmentAttributes
protected
DtSegmentedLine* makVrv::DtOsgWindowLineInstance::myLine
protected
osg::Vec4 makVrv::DtOsgWindowLineInstance::myColor
protected
float makVrv::DtOsgWindowLineInstance::myWidth
protected
unsigned int makVrv::DtOsgWindowLineInstance::myStipplePattern
protected
unsigned int makVrv::DtOsgWindowLineInstance::myGroup
protected
std::vector<double> makVrv::DtOsgWindowLineInstance::mySegmentPercentages
protected
bool makVrv::DtOsgWindowLineInstance::myGeometryDirty
protected
bool makVrv::DtOsgWindowLineInstance::mySegmentsDirty
protected
bool makVrv::DtOsgWindowLineInstance::myUseChannelOverlay
protected
bool makVrv::DtOsgWindowLineInstance::myVisible
protected
osg::Matrix makVrv::DtOsgWindowLineInstance::myTransform
protected
osg::Vec2 makVrv::DtOsgWindowLineInstance::myClipBoxBottomLeft
protected
osg::Vec2 makVrv::DtOsgWindowLineInstance::myClipBoxTopRight
protected
std::string makVrv::DtOsgWindowLineInstance::myDisplayName
protected
std::string makVrv::DtOsgWindowLineInstance::myWindowName
protected
std::string makVrv::DtOsgWindowLineInstance::myChannelName
protected
DtSignalConnectionManager makVrv::DtOsgWindowLineInstance::myConnections
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)