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

This class updates vertices for each triangle added via addTriangle. More...

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

Classes

struct  Triangle
 
struct  TriangleStruct
 

Public Member Functions

 DtOsgWindowTriangleGroupInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowTriangleGroupInstance ()
 DTOR. More...
 
virtual void setTriangleCount (unsigned int count)
 Set the number of Triangles that this group will have Should be set before addTriangle is called. More...
 
virtual void addTriangle (unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1, float xVertex2, float yVertex2)
 Add an Triangle to the specified in params Calls createTriangleStruct. More...
 
virtual void updateTriangle (unsigned int index, unsigned int stipplePattern, float xVertex0, float yVertex0, float xVertex1, float yVertex1, float xVertex2, float yVertex2)
 Update the Triangle at in param index with in parma specs. More...
 
virtual void setVisible (bool isVisible)
 Set all of the Triangles 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::DtOsgWindowPolygonInstance
 DtOsgWindowPolygonInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowPolygonInstance ()
 DTOR. More...
 
virtual void setFillPattern (unsigned int fillPattern)
 Set the polygon's fill pattern. More...
 
virtual void setNumVertices (unsigned int numVertices)
 Set the number of vertices in the polygon. More...
 
virtual void setVertex (int i, double x, double y)
 Set one of the polygon's vertices. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the polygon's color. More...
 
virtual void setFill (bool fill)
 Set the polygon filled or outlined. More...
 
virtual bool visible () const
 Get the polygon's visibility status. 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 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 createPolygon ()
 Create myPolygon according to current state Called from the DtOsgWindowPolygonInstanceCreator::Create. More...
 
virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 Set this objects clip box bounds. More...
 
- Public Member Functions inherited from makVrv::DtWindowPolygonInstance
virtual ~DtWindowPolygonInstance ()
 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 Triangle Loops through myTriangles updating vertices on either the filled polygons or Triangles. More...
 
virtual void deleteAllTriangles ()
 Delete all the pointers and structs in myTriangles. More...
 
virtual DtFilledPolygoncreateTriangle ()
 Create a Triangle. More...
 
- Protected Member Functions inherited from makVrv::DtOsgWindowPolygonInstance
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 Destroy the polygon when the channel its being rendered on is going to be destroyed. More...
 

Protected Attributes

std::vector< TriangleStructmyTriangles
 
unsigned int myTriangleCount
 
- Protected Attributes inherited from makVrv::DtOsgWindowPolygonInstance
DtDemyDe
 
DtPolygonmyPolygon
 
VertexList myVertices
 
osg::Matrix myTransform
 
unsigned int myFillPattern
 
unsigned int myGroup
 
float myColorR
 
float myColorG
 
float myColorB
 
float myColorA
 
bool myFill
 
bool myGeometryDirty
 
bool myUseChannelOverlay
 
bool myVisible
 
osg::Vec2 myClipBoxBottomLeft
 
osg::Vec2 myClipBoxTopRight
 
std::string myDisplayName
 
std::string myWindowName
 
std::string myChannelName
 

Additional Inherited Members

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

Detailed Description

This class updates vertices for each triangle added via addTriangle.

They are stored in a vector of triangleStructs which contain the verts and stipple pattern. You can update the triangles after they have been added without deleting them using updateTriangle. This means that they do not flash on screen. Please call settriangleCount before adding triangles. updateTriangle will adjust the number of DtFilledPolygons this class has to match mytriangleCount.

Constructor & Destructor Documentation

makVrv::DtOsgWindowTriangleGroupInstance::DtOsgWindowTriangleGroupInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowTriangleGroupInstance::~DtOsgWindowTriangleGroupInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowTriangleGroupInstance::setTriangleCount ( unsigned int  count)
virtual

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

virtual void makVrv::DtOsgWindowTriangleGroupInstance::addTriangle ( unsigned int  stipplePattern,
float  xVertex0,
float  yVertex0,
float  xVertex1,
float  yVertex1,
float  xVertex2,
float  yVertex2 
)
virtual

Add an Triangle to the specified in params Calls createTriangleStruct.

virtual void makVrv::DtOsgWindowTriangleGroupInstance::updateTriangle ( unsigned int  index,
unsigned int  stipplePattern,
float  xVertex0,
float  yVertex0,
float  xVertex1,
float  yVertex1,
float  xVertex2,
float  yVertex2 
)
virtual

Update the Triangle at in param index with in parma specs.

The reason index is passed in is because we need to know which Triangle to update. You cannot just delete all the pointers and recreate once all the updateTriangle calls arrive ( indexNumber = myTriangleCount ), because the Triangles will flash on screen!!

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

Set all of the Triangles to visible or invisible.

Reimplemented from makVrv::DtOsgWindowPolygonInstance.

virtual void makVrv::DtOsgWindowTriangleGroupInstance::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::DtOsgWindowPolygonInstance.

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

Generate the vertices of the graphic polygon that approximates the Triangle Loops through myTriangles updating vertices on either the filled polygons or Triangles.

Called by DtOsgWindowTriangleInstance::update()

Reimplemented from makVrv::DtOsgWindowPolygonInstance.

virtual void makVrv::DtOsgWindowTriangleGroupInstance::deleteAllTriangles ( )
protectedvirtual

Delete all the pointers and structs in myTriangles.

virtual DtFilledPolygon* makVrv::DtOsgWindowTriangleGroupInstance::createTriangle ( )
protectedvirtual

Create a Triangle.

Member Data Documentation

std::vector< TriangleStruct > makVrv::DtOsgWindowTriangleGroupInstance::myTriangles
protected
unsigned int makVrv::DtOsgWindowTriangleGroupInstance::myTriangleCount
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)