VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOverlayPolygonModelInstance Class Reference

A model instance class which allows the drawing of a polygon (supporting textures) on an overlay. The polygon supports any combination of the of following:

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

Classes

struct  DtPolygonWithInterfaces
 
struct  VertexData
 

Public Types

using VertexList = std::vector< VertexData >
 

Public Member Functions

 DtOverlayPolygonModelInstance (DtDe &de)
 
virtual ~DtOverlayPolygonModelInstance ()
 
 DtOverlayPolygonModelInstance ()=delete
 
 DtOverlayPolygonModelInstance (const DtOverlayPolygonModelInstance &)=delete
 
DtOverlayPolygonModelInstanceoperator= (const DtOverlayPolygonModelInstance &)=delete
 
virtual void setModelSet (DtModelSetId)
 
virtual void setPosition (int vtx, const DtVector &position)
 
virtual void setRotation (const DtQuat &quat)
 
virtual void setOrigin (const DtVector &)
 
virtual void setGroup (int)
 
virtual DtVector origin () const
 
virtual void addPoint (const DtVector &point, int index)
 
virtual void removePoint (int index)
 
virtual void set2dOffset (int index, float x, float y)
 
virtual void set3dDirection2dLength (int index, float x, float y, float z, float len)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void setFillTexturePath (const std::string &texturePath)
 
virtual void setOutlineTexture (const std::string &texturePath, int width=-1, int height=-1)
 
virtual void setSolidFillCenter (bool)
 
virtual void setStipplePattern (unsigned int stipplePattern)
 
virtual void setWidth (float width)
 
virtual void setEventWidth (float width)
 
virtual void setVisible (bool isVisible)
 
virtual void setPickable (bool enabled)
 
virtual void setEventsEnabled (bool, unsigned long long userData)
 
bool eventsEnabled () const
 
virtual void setFill (bool)
 
virtual void setInsideColor (float r, float g, float b, float a)
 
virtual void getInsideColor (float &r, float &g, float &b, float &a)
 
virtual void setOutsideColor (float r, float g, float b, float a)
 
virtual void getOutsideColor (float &r, float &g, float &b, float &a)
 
virtual int pointCount () const
 
virtual DtVector point (int) const
 
virtual void setFillPattern (const std::vector< unsigned int > &pattern)
 
virtual void setFillPatternFrequency (float frequency)
 
virtual float fillPatternFrequency () const
 
virtual void setOutline (bool)
 
virtual void setEnableDecalProjector (bool enable)
 
virtual bool enableDecalProjector () const
 
virtual void setIsTextureFillFittedToAreaEnabled (bool isTextureFillFittedToAreaEnabled)
 
virtual bool isTextureFillFittedToAreaEnabled () const
 
virtual void setChannelInstance (DtChannel *, DtModelSetId modelSet)
 
virtual const VertexListvertexList () const
 
virtual void setPoints (const std::vector< DtVector > &points)
 
virtual void setVertexList (const VertexList &)
 
virtual const std::vector
< DtVector > & 
points () const
 
virtual void updateGeometry ()
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
virtual bool realize (const DtModelDefinition &definition)
 
virtual bool cloneInstance (const DtModelDefinition &definition)
 
const std::string & realizedDefinitionName () const
 
virtual bool saveModelToFile (const std::string &filename) const
 
const DtVector & boundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVector & boundingBoxCenter () const
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
const DtVector & allGeometryboundingBoxExtents () const
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVector & allGeometryboundingBoxCenter () const
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
virtual void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 
virtual void setBlendColor (float r, float g, float b, float a)
 
virtual void enableColorBlending (bool b)
 

Protected Member Functions

virtual void createPolygonIfNecessary ()
 
virtual void updateColors ()
 
virtual void computeTopoTransform (DtCoordTransform &geocToTopo, DtVector &geocentricOrigin) const
 
virtual void updateTextureCoordinates (DtFilledPolygonInterface *polygon)
 
virtual void translateAndUpdateVertex (unsigned int index, const VertexData &vert, DtPolygonInterface *polygon)
 
virtual void channelUpdated (const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData &)
 
virtual std::vector< DtVector > topographicVertices () const
 
virtual void slot_coordinateSystemChanged ()
 
virtual void deletePolygons ()
 

Protected Attributes

VertexList myVertices
 
DtSignalConnectionManager myConnections
 
vrvTacticalGraphicUtilities::DtVerticesVector myPoints
 
DtPolygonWithInterfaces myPolygonOne
 
DtPolygonWithInterfaces myPolygonTwo
 
DtTextureInterfacemyFillTexture
 
DtTextureInterfacemyOutlineTexture
 
bool myIsTextureFillFittedToAreaEnabled
 
bool myFilled
 
float myFillPatternFrequency
 
float myWidth
 
DtVector4< float > myInnerColor
 
DtVector4< float > myOuterColor
 
unsigned int myStipplePattern
 
DtModelSetId myModelSet
 
unsigned long long myUserData
 
bool myEventsEnabled
 
bool myVisibleFlag
 
bool myOutline
 
bool mySolidFillCenter
 
bool myEnableDecalProjector
 
DtVector myOrigin
 
DtQuat myRotation
 
DtChannelmyChannelInstance
 
int myGroup
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
 
std::string myRealizedModelDefinitionName
 
DtVector myBoundingBoxCenter
 
DtVector myBoundingBoxExtents
 
DtVector myBoundingBoxMinimum
 
DtVector myBoundingBoxMaximum
 
DtVector myAllGeometryBoundingBoxCenter
 
DtVector myAllGeometryBoundingBoxExtents
 
DtVector myAllGeometryBoundingBoxMinimum
 
DtVector myAllGeometryBoundingBoxMaximum
 
bool myContributesToBound
 
bool myColorBlendingEnabled
 
float myBlendRed
 
float myBlendBlue
 
float myBlendGreen
 
float myBlendAlpha
 

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtModelInstance
static float readFloat (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector readVector (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector4< float > readVector4 (const std::string &paramName, const DtModelDefinition &definition)
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtOverlayPolygonModelInstance::DtOverlayPolygonModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtOverlayPolygonModelInstance::~DtOverlayPolygonModelInstance ( )
virtual

DTOR.

makVrv::DtOverlayPolygonModelInstance::DtOverlayPolygonModelInstance ( )
delete

Default Constructor not implemented.

makVrv::DtOverlayPolygonModelInstance::DtOverlayPolygonModelInstance ( const DtOverlayPolygonModelInstance )
delete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtOverlayPolygonModelInstance& makVrv::DtOverlayPolygonModelInstance::operator= ( const DtOverlayPolygonModelInstance )
delete

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtOverlayPolygonModelInstance::setModelSet ( DtModelSetId  )
virtual

Sets the model set this overlay item belongs to. Will clear out channelInstance if set.

virtual void makVrv::DtOverlayPolygonModelInstance::setPosition ( int  vtx,
const DtVector &  position 
)
virtual

Set one of the endpoints of the Polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setRotation ( const DtQuat quat)
virtual

Set the rotation of the polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setOrigin ( const DtVector &  )
virtual

Sets the origin. Will update geometry.

virtual void makVrv::DtOverlayPolygonModelInstance::setGroup ( int  )
virtual

The higher the Z order the "closer" to the eyepoint this element will be drawn. Use this variable to stack overlay objects in the particular order you want them displayed.

virtual DtVector makVrv::DtOverlayPolygonModelInstance::origin ( ) const
virtual

Returns the origin.

virtual void makVrv::DtOverlayPolygonModelInstance::addPoint ( const DtVector &  point,
int  index 
)
virtual

Add a new point to the polygon at the specified index, or, at the end if index is -1.

virtual void makVrv::DtOverlayPolygonModelInstance::removePoint ( int  index)
virtual

Removes the point from the specified index.

virtual void makVrv::DtOverlayPolygonModelInstance::set2dOffset ( int  index,
float  x,
float  y 
)
virtual

Sets the 2D offset of a vertex.

virtual void makVrv::DtOverlayPolygonModelInstance::set3dDirection2dLength ( int  index,
float  x,
float  y,
float  z,
float  len 
)
virtual

Sets a 3D direction with a 2D length of a vertex. This only works with outline polygons.

virtual void makVrv::DtOverlayPolygonModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the Polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setFillTexturePath ( const std::string &  texturePath)
virtual

The texture will be projected using the x-y coordinates of a topographic frame with the origin at some arbitrary point of the polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setOutlineTexture ( const std::string &  texturePath,
int  width = -1,
int  height = -1 
)
virtual

Set the path to the polygon's outline texture as well as the tile size the texture will be scaled to.

Parameters
texturePathThe path to the polygon's outline texture
widthThe width to scale to. If this argument or height are -1, no scaling is applied.
heightThe height to scale to. If this argument or width are -1, no scaling is applied.
virtual void makVrv::DtOverlayPolygonModelInstance::setSolidFillCenter ( bool  )
virtual

Sets to fill the center solid (if filled) not gradiant. Default is false.

virtual void makVrv::DtOverlayPolygonModelInstance::setStipplePattern ( unsigned int  stipplePattern)
virtual

Sets stipple pattern for the polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setWidth ( float  width)
virtual

Set the polygon outline width.

virtual void makVrv::DtOverlayPolygonModelInstance::setEventWidth ( float  width)
virtual

Set the polygon outline width.

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

Sets whether the model is visible or not.

Implements makVrv::DtModelInstance.

virtual void makVrv::DtOverlayPolygonModelInstance::setPickable ( bool  enabled)
virtual

Sets whether or not the polygon is pickable.

virtual void makVrv::DtOverlayPolygonModelInstance::setEventsEnabled ( bool  ,
unsigned long long  userData 
)
virtual

Sets whether or not mouse events are enabled.

bool makVrv::DtOverlayPolygonModelInstance::eventsEnabled ( ) const

Gets whether or not mouse events are enabled.

virtual void makVrv::DtOverlayPolygonModelInstance::setFill ( bool  )
virtual

Sets whether or not polygon is filled.

virtual void makVrv::DtOverlayPolygonModelInstance::setInsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color at the center of the ellipse.

virtual void makVrv::DtOverlayPolygonModelInstance::getInsideColor ( float &  r,
float &  g,
float &  b,
float &  a 
)
virtual

Retrieves the inside color.

virtual void makVrv::DtOverlayPolygonModelInstance::setOutsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color on the outside of the ellipse.

virtual void makVrv::DtOverlayPolygonModelInstance::getOutsideColor ( float &  r,
float &  g,
float &  b,
float &  a 
)
virtual

Retrieves the inside color.

virtual int makVrv::DtOverlayPolygonModelInstance::pointCount ( ) const
virtual

Retrieves the number of points in the model.

virtual DtVector makVrv::DtOverlayPolygonModelInstance::point ( int  ) const
virtual

Retrieves the point.

virtual void makVrv::DtOverlayPolygonModelInstance::setFillPattern ( const std::vector< unsigned int > &  pattern)
virtual

Sets fill pattern (32x32)

virtual void makVrv::DtOverlayPolygonModelInstance::setFillPatternFrequency ( float  frequency)
virtual

Sets the fill pattern tiling frequency. The frequency needs to be 1 / x where x is a whole number. examples: frequency = 1.0 : the tiled pattern will tile normally frequency = 0.5 : the tiled pattern will appear half as often.

virtual float makVrv::DtOverlayPolygonModelInstance::fillPatternFrequency ( ) const
virtual

Returns the fill pattern tiling frequency.

virtual void makVrv::DtOverlayPolygonModelInstance::setOutline ( bool  )
virtual

Sets the fact that, if the object is filled, also provide an outline scribe. Basically create a filled and outline polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setEnableDecalProjector ( bool  enable)
virtual

Set whether or not the geometry is used for a decal projector.

virtual bool makVrv::DtOverlayPolygonModelInstance::enableDecalProjector ( ) const
virtual

Returns whether or not the geometry is used for a decal projector.

virtual void makVrv::DtOverlayPolygonModelInstance::setIsTextureFillFittedToAreaEnabled ( bool  isTextureFillFittedToAreaEnabled)
virtual

If using a texture-based fill, set whether or not the texture should be fitted to fill the entire area. If a texture is fitted to fill the entire area, the texture will not be rendered multiple times in a repeated/tile-like manner.

virtual bool makVrv::DtOverlayPolygonModelInstance::isTextureFillFittedToAreaEnabled ( ) const
virtual

Get whether or not the texture should be fitted to fill the entire area. If a texture is fitted to fill the entire area, the texture will not be rendered multiple times in a repeated/tile-like manner.

virtual void makVrv::DtOverlayPolygonModelInstance::setChannelInstance ( DtChannel ,
DtModelSetId  modelSet 
)
virtual

Set to make this model channel specific. This means it will only update itself when the channel it is assigned to is updated. Enabled only to display on the channel/model set combination.

virtual const VertexList& makVrv::DtOverlayPolygonModelInstance::vertexList ( ) const
virtual

Returns the vertex information for this polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setPoints ( const std::vector< DtVector > &  points)
virtual

Sets all the points for this polygon.

virtual void makVrv::DtOverlayPolygonModelInstance::setVertexList ( const VertexList )
virtual

Sets the vertex information for this polygon.

virtual const std::vector<DtVector>& makVrv::DtOverlayPolygonModelInstance::points ( ) const
virtual

Returns the list of vertices.

virtual void makVrv::DtOverlayPolygonModelInstance::updateGeometry ( )
virtual

Updates the vertex information into the polygon (if not locked)

virtual void makVrv::DtOverlayPolygonModelInstance::createPolygonIfNecessary ( )
protectedvirtual

If not already created, creates the appropriate polygon (filled OR outlined) and perimeter wrapped text.

virtual void makVrv::DtOverlayPolygonModelInstance::updateColors ( )
protectedvirtual

Updates the colors of the object.

virtual void makVrv::DtOverlayPolygonModelInstance::computeTopoTransform ( DtCoordTransform &  geocToTopo,
DtVector &  geocentricOrigin 
) const
protectedvirtual

Helper method to compute the current topo coordinate transform based on the current coordinate system and first vertex location.

virtual void makVrv::DtOverlayPolygonModelInstance::updateTextureCoordinates ( DtFilledPolygonInterface polygon)
protectedvirtual

Updates the given polygon's texture coodinates using top-down texture projection.

virtual void makVrv::DtOverlayPolygonModelInstance::translateAndUpdateVertex ( unsigned int  index,
const VertexData vert,
DtPolygonInterface polygon 
)
protectedvirtual

Sets a polygon vertex's position.

virtual void makVrv::DtOverlayPolygonModelInstance::channelUpdated ( const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData )
protectedvirtual

Update texture information with zoom and orientation changes.

virtual std::vector<DtVector> makVrv::DtOverlayPolygonModelInstance::topographicVertices ( ) const
protectedvirtual

Converts all vertices from local coordinates to topographic. Easier to use for triangulation.

virtual void makVrv::DtOverlayPolygonModelInstance::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

virtual void makVrv::DtOverlayPolygonModelInstance::deletePolygons ( )
protectedvirtual

Member Data Documentation

VertexList makVrv::DtOverlayPolygonModelInstance::myVertices
protected
DtSignalConnectionManager makVrv::DtOverlayPolygonModelInstance::myConnections
protected
vrvTacticalGraphicUtilities::DtVerticesVector makVrv::DtOverlayPolygonModelInstance::myPoints
protected
DtPolygonWithInterfaces makVrv::DtOverlayPolygonModelInstance::myPolygonOne
protected
DtPolygonWithInterfaces makVrv::DtOverlayPolygonModelInstance::myPolygonTwo
protected
DtTextureInterface* makVrv::DtOverlayPolygonModelInstance::myFillTexture
protected
DtTextureInterface* makVrv::DtOverlayPolygonModelInstance::myOutlineTexture
protected
bool makVrv::DtOverlayPolygonModelInstance::myIsTextureFillFittedToAreaEnabled
protected
bool makVrv::DtOverlayPolygonModelInstance::myFilled
protected
float makVrv::DtOverlayPolygonModelInstance::myFillPatternFrequency
protected
float makVrv::DtOverlayPolygonModelInstance::myWidth
protected
DtVector4<float> makVrv::DtOverlayPolygonModelInstance::myInnerColor
protected
DtVector4<float> makVrv::DtOverlayPolygonModelInstance::myOuterColor
protected
unsigned int makVrv::DtOverlayPolygonModelInstance::myStipplePattern
protected
DtModelSetId makVrv::DtOverlayPolygonModelInstance::myModelSet
protected
unsigned long long makVrv::DtOverlayPolygonModelInstance::myUserData
protected
bool makVrv::DtOverlayPolygonModelInstance::myEventsEnabled
protected
bool makVrv::DtOverlayPolygonModelInstance::myVisibleFlag
protected
bool makVrv::DtOverlayPolygonModelInstance::myOutline
protected
bool makVrv::DtOverlayPolygonModelInstance::mySolidFillCenter
protected
bool makVrv::DtOverlayPolygonModelInstance::myEnableDecalProjector
protected
DtVector makVrv::DtOverlayPolygonModelInstance::myOrigin
protected
DtQuat makVrv::DtOverlayPolygonModelInstance::myRotation
protected
DtChannel* makVrv::DtOverlayPolygonModelInstance::myChannelInstance
protected
int makVrv::DtOverlayPolygonModelInstance::myGroup
protected
DtCoordinateSystem* makVrv::DtOverlayPolygonModelInstance::myCoordinateSystem = nullptr
protected

local clone of the system wide coordinate system. for thread safety.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)