VR-Forces 5.0.3 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::DtOsgWindowLineGroupInstance Class Reference

This class updates vertices for each line added via addLine. They are stored in a vector of LineStructs which contain the verts and stipple pattern. You can update the lines after they have been added without deleting them using updateLine. This means that they do not flash on screen. Please call setLineCount before adding lines. updateLine will adjust the number of DtSegmentedLines this class has to match myLineCount.

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

Classes

struct  Line
 
struct  LineStruct
 

Public Member Functions

 DtOsgWindowLineGroupInstance (DtDe &de)
 
virtual ~DtOsgWindowLineGroupInstance ()
 
virtual void setLineCount (unsigned int count)
 
virtual void addLine (float lineWidth, unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1)
 
virtual void updateLine (unsigned int index, float lineWidth, unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1)
 
virtual void setVisible (bool isVisible)
 
virtual void setChannelOverlay (const std::string &displayName, const std::string &windowName, const std::string &channelName) override
 
- Public Member Functions inherited from makVrv::DtOsgWindowLineInstance
 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 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 Member Functions

virtual void updateGeometry ()
 
virtual void deleteAllLines ()
 
virtual DtSegmentedLinecreateAdditionalLine ()
 
- Protected Member Functions inherited from makVrv::DtOsgWindowLineInstance
virtual void resizeSegmentAttributes (int size)
 
virtual void updateSegments ()
 
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 slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 

Protected Attributes

std::vector< LineStructmyLines
 
unsigned int myLineCount
 
- Protected Attributes inherited from makVrv::DtOsgWindowLineInstance
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
 

Additional Inherited Members

- Protected Types inherited from makVrv::DtOsgWindowLineInstance
typedef std::vector
< SegmentAttributes
SegmentAttributesVector
 
typedef std::vector< osg::Vec2 > Points
 

Constructor & Destructor Documentation

makVrv::DtOsgWindowLineGroupInstance::DtOsgWindowLineGroupInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowLineGroupInstance::~DtOsgWindowLineGroupInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowLineGroupInstance::setLineCount ( unsigned int  count)
virtual

Set the number of Lines that this group will have Should be set before addLine is called.

virtual void makVrv::DtOsgWindowLineGroupInstance::addLine ( float  lineWidth,
unsigned int  stipplePattern,
float  xVertex0,
float  yVertex0,
float  xVertex1,
float  yVertex1 
)
virtual

Add an Line to the specified in params Calls createLineStruct.

virtual void makVrv::DtOsgWindowLineGroupInstance::updateLine ( unsigned int  index,
float  lineWidth,
unsigned int  stipplePattern,
float  xVertex0,
float  yVertex0,
float  xVertex1,
float  yVertex1 
)
virtual

Update the Line at in param index with in parma specs. The reason index is passed in is because we need to know which Line to update. You cannot just delete all the pointers and recreate once all the updateLine calls arrive ( indexNumber = myLineCount ), because the Lines will flash on screen!!

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

Set all of the Lines to visible or invisible.

Reimplemented from makVrv::DtOsgWindowLineInstance.

virtual void makVrv::DtOsgWindowLineGroupInstance::setChannelOverlay ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName 
)
overridevirtual

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.

Reimplemented from makVrv::DtOsgWindowLineInstance.

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

Generate the vertices of the graphic polygon that approximates the Line Loops through myLines updating vertices on either the filled polygons or lines. Called by DtOsgWindowLineInstance::update()

Reimplemented from makVrv::DtOsgWindowLineInstance.

virtual void makVrv::DtOsgWindowLineGroupInstance::deleteAllLines ( )
protectedvirtual

Delete all the pointers and structs in myLines.

virtual DtSegmentedLine* makVrv::DtOsgWindowLineGroupInstance::createAdditionalLine ( )
protectedvirtual

Create a line.

Member Data Documentation

std::vector< LineStruct > makVrv::DtOsgWindowLineGroupInstance::myLines
protected
unsigned int makVrv::DtOsgWindowLineGroupInstance::myLineCount
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)