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::DtOsgWindowEllipseGroupInstance Class Reference

This class updates vertices for each ellipse added via addellipse. They are stored in a vector of EllipseStructs which contain the verts and stipple pattern. You can update the ellipses after they have been added without deleting them using updateellipse. This means that they do not flash on screen. Please call setEllipseCount before adding ellipses. updateEllipse will adjust the number of DtFilledPolygons this class has to match myEllipseCount. If the ellipse is outlined a DtFilledPolygon is not used, a vertor of DtSegementedLines is instead.

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

Classes

struct  Ellipse
 
struct  EllipseStruct
 

Public Member Functions

 DtOsgWindowEllipseGroupInstance (DtDe &de)
 
virtual ~DtOsgWindowEllipseGroupInstance ()
 
virtual void setEllipseCount (unsigned int count)
 
virtual void addEllipse (unsigned int stipplePattern, bool fill, float lineWidth, float centerX, float centerY, float radius, float innerRadius, float startAngle, float endAngle)
 
virtual void updateEllipse (unsigned int index, unsigned int stipplePattern, bool fill, float lineWidth, float centerX, float centerY, float radius, float innerRadius, float startAngle, float endAngle)
 
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::DtOsgWindowEllipseInstance
 DtOsgWindowEllipseInstance (DtDe &de)
 
virtual ~DtOsgWindowEllipseInstance ()
 
virtual void setFillPattern (unsigned int fillPattern)
 
virtual void setFill (bool fill)
 
virtual void setCenter (double x, double y)
 
virtual void setNumVertices (unsigned int numVertices)
 
virtual void setDimensions (double xLength, double yLength)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual bool visible ()
 
virtual void setTransform (DtMatrix3< double > transform)
 
virtual void update ()
 
virtual void setGroup (int groupId)
 
virtual void setInnerDimensions (double xLength, double yLength)
 
virtual void setStartEndAngles (double startAngle, double endAngle)
 
virtual void setLineWidth (float lineWidth)
 
virtual void createPolygon ()
 
virtual void createLines (unsigned int lineCount)
 
virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 
- Public Member Functions inherited from makVrv::DtWindowEllipseInstance
virtual ~DtWindowEllipseInstance ()
 
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()
 

Protected Member Functions

virtual void updateVertices ()
 
virtual void updateFilledPolygon (DtFilledPolygon *poly, Ellipse ellipseInfo)
 
virtual void updateLineSegments (std::vector< DtSegmentedLine * > &vec, Ellipse ellipseInfo)
 
virtual void deleteAllEllipses ()
 
DtFilledPolygoncreateFilledPolygon ()
 
virtual void createLinesVector (unsigned int lineCount, std::vector< DtSegmentedLine * > &vec)
 
virtual void createEllipseStruct (Ellipse ellipse)
 
- Protected Member Functions inherited from makVrv::DtOsgWindowEllipseInstance
virtual void updateFilledPolygon ()
 
virtual void updateOutlinedSegments ()
 
virtual DtSegmentedLinecreateLine ()
 
virtual osg::Vec2 transformVectorByTransform (osg::Vec2 vector, osg::Matrix transform)
 
virtual VertexList buildVertices (double &startAngle, int numVertices, double arcPerVertex, osg::Vec2 dimensions, osg::Matrix transform)
 
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 

Protected Attributes

std::vector< EllipseStructmyEllipses
 
unsigned int myEllipseCount
 
- Protected Attributes inherited from makVrv::DtOsgWindowEllipseInstance
DtDemyDe
 
DtFilledPolygonmyPolygon
 
std::vector< DtSegmentedLine * > myClippedOutlineEllipse
 
osg::Matrix myTransform
 
osg::Vec2 myDimensions
 
osg::Vec2 myInnerDimensions
 
osg::Vec2 myCenter
 
osg::Vec2 myClipBoxBottomLeft
 
osg::Vec2 myClipBoxTopRight
 
unsigned int myFillPattern
 
unsigned int myGroup
 
unsigned int myNumVertices
 
bool myGeometryDirty
 
bool myFill
 
bool myUseChannelOverlay
 
bool myVisible
 
std::string myDisplayName
 
std::string myWindowName
 
std::string myChannelName
 
float myColorR
 
float myColorG
 
float myColorB
 
float myColorA
 
float myLineWdith
 
double myStartAngle
 
double myEndAngle
 
DtSignalConnectionManager myConnections
 

Additional Inherited Members

- Protected Types inherited from makVrv::DtOsgWindowEllipseInstance
typedef std::vector< osg::Vec2 > VertexList
 

Constructor & Destructor Documentation

makVrv::DtOsgWindowEllipseGroupInstance::DtOsgWindowEllipseGroupInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowEllipseGroupInstance::~DtOsgWindowEllipseGroupInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowEllipseGroupInstance::setEllipseCount ( unsigned int  count)
virtual

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

virtual void makVrv::DtOsgWindowEllipseGroupInstance::addEllipse ( unsigned int  stipplePattern,
bool  fill,
float  lineWidth,
float  centerX,
float  centerY,
float  radius,
float  innerRadius,
float  startAngle,
float  endAngle 
)
virtual

Add an ellipse to the specified in params Angles are in radians. Calls createEllipseStruct.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::updateEllipse ( unsigned int  index,
unsigned int  stipplePattern,
bool  fill,
float  lineWidth,
float  centerX,
float  centerY,
float  radius,
float  innerRadius,
float  startAngle,
float  endAngle 
)
virtual

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

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

Set all of the ellipses to visible or invisible.

Reimplemented from makVrv::DtOsgWindowEllipseInstance.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::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::DtOsgWindowEllipseInstance.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::updateVertices ( )
protectedvirtual

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

Reimplemented from makVrv::DtOsgWindowEllipseInstance.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::updateFilledPolygon ( DtFilledPolygon poly,
Ellipse  ellipseInfo 
)
protectedvirtual

Update the in param polygon to the in param ellipseInfo.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::updateLineSegments ( std::vector< DtSegmentedLine * > &  vec,
Ellipse  ellipseInfo 
)
protectedvirtual

Update the in param vector of lines to the in param ellipseInfo.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::deleteAllEllipses ( )
protectedvirtual

Delete all the pointers and structs in myEllipses.

DtFilledPolygon* makVrv::DtOsgWindowEllipseGroupInstance::createFilledPolygon ( )
protected

Create a DtFilledPolygon.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::createLinesVector ( unsigned int  lineCount,
std::vector< DtSegmentedLine * > &  vec 
)
protectedvirtual

Create a vector of DtSegmentedLines.

virtual void makVrv::DtOsgWindowEllipseGroupInstance::createEllipseStruct ( Ellipse  ellipse)
protectedvirtual

Create an ellipse struct from the passed in ellipse Creates a DtFilledPolygon or a vector of segmented lines depending on the fill. Pushes the struct into myEllipses.

Member Data Documentation

std::vector< EllipseStruct > makVrv::DtOsgWindowEllipseGroupInstance::myEllipses
protected
unsigned int makVrv::DtOsgWindowEllipseGroupInstance::myEllipseCount
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)