VR-Forces 4.10 Class Documentation
 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. More...

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

Classes

struct  Line
 Container for lines. More...
 
struct  LineStruct
 

Public Member Functions

 DtOsgWindowLineGroupInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowLineGroupInstance ()
 DTOR. More...
 
virtual void setLineCount (unsigned int count)
 Set the number of Lines that this group will have Should be set before addLine is called. More...
 
virtual void addLine (float lineWidth, unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1)
 Add an Line to the specified in params Calls createLineStruct. More...
 
virtual void updateLine (unsigned int index, float lineWidth, unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1)
 Update the Line at in param index with in parma specs. More...
 
virtual void setVisible (bool isVisible)
 Set all of the Lines to visible or invisible. More...
 
virtual void setChannelOverlay (std::string displayName, std::string windowName, std::string channelName)
 By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword. More...
 
- Public Member Functions inherited from makVrv::DtOsgWindowLineInstance
 DtOsgWindowLineInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowLineInstance ()
 DTOR. More...
 
virtual void setVertex (unsigned int vertex, double x, double y)
 Set (or add) the specified vertex at <x,y> More...
 
virtual void removeVertex (unsigned int vertex)
 Remove the specified vertex. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the entire line color. More...
 
virtual void setStipplePattern (unsigned int stipplePattern)
 Set the entire line stipple pattern. More...
 
virtual void setWidth (unsigned int width)
 Set the entire line width. More...
 
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 Set the percentage lengths of the segments; creates and removes segments as necessary. More...
 
virtual void setSegmentColor (unsigned int index, float r, float g, float b, float a)
 Set the color of a segment. More...
 
virtual void setSegmentStartColor (unsigned int index, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment. More...
 
virtual void setSegmentEndColor (unsigned int index, float r, float g, float b, float a)
 Set the color of the second vertex in a segment. More...
 
virtual void setSegmentLightningStyle (unsigned int index, bool enableLightningStyle)
 Set a segment's lightning style (whether or not it looks like a lighting bolt) More...
 
virtual void setSegmentStartArrow (unsigned int index, bool enableStartArrow)
 Turn on or off a segment's start arrow. More...
 
virtual void setSegmentEndArrow (unsigned int index, bool enableEndArrow)
 Turn on or off a segment's end arrow. More...
 
virtual void setSegmentStipplePattern (unsigned int index, unsigned int stippleScale, unsigned int stipplePattern)
 Set the stipple pattern for a segment according to the OpenGL line stipple feature. More...
 
virtual void setSegmentWidth (unsigned int index, unsigned int width)
 Set the width of a segment in pixels. More...
 
virtual void update ()
 Called on signal_postUpdate; time to update render data. More...
 
virtual void setTransform (DtMatrix3< double > transform)
 Sets the line's transform matrix, used to update the position and clockwise rotation of the vertices. More...
 
virtual void createLine ()
 Creates the line model. More...
 
virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 Set this objects clip box bounds. More...
 
virtual void setGroup (int groupId)
 Set this object's group ID for z order. More...
 
- Public Member Functions inherited from makVrv::DtWindowLineInstance
virtual ~DtWindowLineInstance ()
 DTOR. More...
 
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()
 

Protected Member Functions

virtual void updateGeometry ()
 Generate the vertices of the graphic polygon that approximates the Line Loops through myLines updating vertices on either the filled polygons or lines. More...
 
virtual void deleteAllLines ()
 Delete all the pointers and structs in myLines. More...
 
virtual DtSegmentedLinecreateAdditionalLine ()
 Create a line. More...
 
- Protected Member Functions inherited from makVrv::DtOsgWindowLineInstance
virtual void resizeSegmentAttributes (int size)
 Add segments to the segments attribute vector. More...
 
virtual void updateSegments ()
 Updates the segment information. More...
 
virtual void generateSegment (int segmentIndex, const osg::Vec2 &startPoint, const osg::Vec2 &endPoint, const osg::Vec2 &segmentAxis, const osg::Vec2 &segmentPerpendicular)
 Generate vertices for a single segment. More...
 
virtual void setupColorRanges (SegmentAttributes *segmentAttributes)
 Determine the sub-segment range for each segment color specified. More...
 
virtual void setLineSegmentColors (unsigned int vtx, SegmentAttributes *segmentAttributes)
 Sets the point colors for the line segments based on the features and colors provided in segmentAttributes. More...
 
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 Destroy the line when the channel its being rendered on is going to be destroyed. More...
 

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
 

Additional Inherited Members

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

Detailed Description

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.

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 ( std::string  displayName,
std::string  windowName,
std::string  channelName 
)
virtual

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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)