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

This class updates vertices for each ellipse added via addellipse. More...

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

Classes

struct  Ellipse
 
struct  EllipseStruct
 

Public Member Functions

 DtOsgWindowEllipseGroupInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowEllipseGroupInstance ()
 DTOR. More...
 
virtual void setEllipseCount (unsigned int count)
 Set the number of ellipses that this group will have Should be set before addEllipse is called. More...
 
virtual void addEllipse (unsigned int stipplePattern, bool fill, float lineWidth, float centerX, float centerY, float radius, float innerRadius, float startAngle, float endAngle)
 Add an ellipse to the specified in params Angles are in radians. More...
 
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)
 Update the ellipse at in param index with in parma specs. More...
 
virtual void setVisible (bool isVisible)
 Set all of the ellipses 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::DtOsgWindowEllipseInstance
 DtOsgWindowEllipseInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowEllipseInstance ()
 DTOR. More...
 
virtual void setFillPattern (unsigned int fillPattern)
 Set the ellipse's fill pattern. More...
 
virtual void setFill (bool fill)
 Set the ellipse filled or outlined. More...
 
virtual void setCenter (double x, double y)
 Set the center of the ellipse in normalized screen coordinates. More...
 
virtual void setNumVertices (unsigned int numVertices)
 Set the number of vertices in the ellipse. More...
 
virtual void setDimensions (double xLength, double yLength)
 Set the lengths of the ellipse's axes in normalized screen coordinates. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the ellipse's color. More...
 
virtual bool visible ()
 Return visibility status. More...
 
virtual void setTransform (DtMatrix3< double > transform)
 Sets the ellipse's transform matrix, used to update the position, clockwise rotation, and scale of the vertices. More...
 
virtual void update ()
 Called on signal_postUpdate; time to update render data. More...
 
virtual void setGroup (int groupId)
 Set this object's group ID for z order. More...
 
virtual void setInnerDimensions (double xLength, double yLength)
 Set the inner dimensions of this ellipse, if this is set the ellipse shall be rendered hollow. More...
 
virtual void setStartEndAngles (double startAngle, double endAngle)
 Allows for drawing of subsections of an ellipse. More...
 
virtual void setLineWidth (float lineWidth)
 Set line width if this ellipse is outlined. More...
 
virtual void createPolygon ()
 Create myPolygon according to current state Called from the constructor, so this can't be virtual. More...
 
virtual void createLines (unsigned int lineCount)
 Create a number of lines to use when this ellipse is not filled. More...
 
virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 Set this objects clip box bounds. More...
 
- Public Member Functions inherited from makVrv::DtWindowEllipseInstance
virtual ~DtWindowEllipseInstance ()
 DTOR. More...
 
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()
 

Protected Member Functions

virtual void updateVertices ()
 Generate the vertices of the graphic polygon that approximates the ellipse Loops through myEllipses updating vertices on either the filled polygons or lines. More...
 
virtual void updateFilledPolygon (DtFilledPolygon *poly, Ellipse ellipseInfo)
 Update the in param polygon to the in param ellipseInfo. More...
 
virtual void updateLineSegments (std::vector< DtSegmentedLine * > &vec, Ellipse ellipseInfo)
 Update the in param vector of lines to the in param ellipseInfo. More...
 
virtual void deleteAllEllipses ()
 Delete all the pointers and structs in myEllipses. More...
 
DtFilledPolygoncreateFilledPolygon ()
 Create a DtFilledPolygon. More...
 
virtual void createLinesVector (unsigned int lineCount, std::vector< DtSegmentedLine * > &vec)
 Create a vector of DtSegmentedLines. More...
 
virtual void createEllipseStruct (Ellipse ellipse)
 Create an ellipse struct from the passed in ellipse Creates a DtFilledPolygon or a vector of segmented lines depending on the fill. More...
 
- Protected Member Functions inherited from makVrv::DtOsgWindowEllipseInstance
virtual void updateFilledPolygon ()
 Updates myPolygon. More...
 
virtual void updateOutlinedSegments ()
 Updates myClippedOutlineEllipse. More...
 
virtual DtSegmentedLinecreateLine ()
 Create a DtSegmentLine. More...
 
virtual osg::Vec2 transformVectorByTransform (osg::Vec2 vector, osg::Matrix transform)
 Transform the in param vec2 by the in param transform. More...
 
virtual VertexList buildVertices (double &startAngle, int numVertices, double arcPerVertex, osg::Vec2 dimensions, osg::Matrix transform)
 Populates a vector of osg::Vec2s according to the passed in params. More...
 
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 Destroy the ellipse when the channel its being rendered on is going to be destroyed. More...
 

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
 

Additional Inherited Members

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

Detailed Description

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.

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