VR-Forces 5.0.2 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 | Private Member Functions
makVrv::DtOsgOverlayPolygonModelInstance Class Reference

Model instance to draw a polygon on the overlay, either filled or outline.

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

Classes

struct  VertexData
 

Public Types

typedef std::vector< VertexDataVertexList
 
- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 
typedef std::unordered_map
< std::string, bool
SensorRegionStateMap
 

Public Member Functions

 DtOsgOverlayPolygonModelInstance (DtDe &de)
 
virtual ~DtOsgOverlayPolygonModelInstance ()
 
virtual void setModelSet (int)
 
virtual void setPosition (int vtx, const DtVector &position)
 
virtual void setRotation (const osg::Quat &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 setTexturePath (const std::string &texturePath)
 
virtual void setOutlineTexture (const std::string &texturePath)
 
virtual void setOutlineTexture (osg::Texture *texture)
 
virtual void setSolidFillCenter (bool)
 
virtual void setNumTextureTiles (double numTiles)
 
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 setOutline (bool)
 
virtual void setChannelInstance (DtChannel *, int 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::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool realize (DtModelDefinition &definition)
 
virtual bool cloneInstance (DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual bool saveModelToFile (const std::string &filename) const
 
virtual void enableColorBlending (bool b)
 
virtual void setBlendColor (float r, float g, float b, float a)
 
virtual void enableTexture (bool onOff)
 
virtual osg::Node * rootNode ()
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 
virtual const osg::Node * sensorNode () const
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 
virtual bool dynamicSensorRegion (const std::string &region)
 
virtual const
SensorRegionStateMap
dynamicSensorRegionMap () const
 
virtual void slot_atcGlobalModelEnableChanged ()
 
virtual bool alphaToCoverageEnabled ()
 
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
const std::string & realizedDefinitionName () const
 
const DtVectorboundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorboundingBoxCenter () const
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
const DtVectorallGeometryboundingBoxExtents () const
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorallGeometryboundingBoxCenter () const
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
virtual void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 

Protected Member Functions

virtual void createPolygonIfNecessary ()
 
virtual void updateColors ()
 
virtual void translateAndUpdateVertex (unsigned int index, const VertexData &vert, DtPolygon *polygon)
 
virtual void channelUpdated (const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData &)
 
virtual std::vector< DtVectortopographicVertices () const
 
virtual void slot_coordinateSystemChanged ()
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 DtOsgModelInstance (DtDe &de)
 
virtual void updateColorBlending ()
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
virtual void setRootNode (osg::Node *node)
 
virtual void setUpDepthTest (osg::StateSet *stateSet)
 

Protected Attributes

VertexList myVertices
 
std::vector< DtVectormyPoints
 
DtPolygonmyPolygon
 
DtPolygonmyOutlinePolygon
 
bool myFilled
 
float myWidth
 
osg::Vec4 myInnerColor
 
osg::Vec4 myOuterColor
 
unsigned int myStipplePattern
 
int myModelSet
 
unsigned long long myUserData
 
bool myEventsEnabled
 
bool myVisibleFlag
 
bool myOutline
 
bool mySolidFillCenter
 
osg::Vec3d myOrigin
 
osg::Quat myRotation
 
osg::ref_ptr< osg::Texture > myOutlineTexture
 
DtChannelmyChannelInstance
 
int myGroup
 
DtSignalConnectionManager myConnections
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
 
osg::ref_ptr< osg::StateSet > myCachedState
 
SensorRegionStateMap mySensorRegionMap
 
AlphaToCoverageState myAlphaToCoverageState
 
DtSignalConnectionManager myConnections
 
bool myModelInstanceShaderSet
 
- 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
 

Private Member Functions

 DtOsgOverlayPolygonModelInstance ()
 
 DtOsgOverlayPolygonModelInstance (const DtOsgOverlayPolygonModelInstance &)
 
DtOsgOverlayPolygonModelInstanceoperator= (const DtOsgOverlayPolygonModelInstance &)
 

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec4 &initValue=osg::Vec4(1, 1, 1, 1))
 
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec3 &initValue=osg::Vec3(1, 1, 1))
 
- 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)
 
- Public Attributes inherited from makVrv::DtOsgModelInstance
boost::signalslib::signal
< void(const std::string &) > 
signal_dynamicSensorRegionAdded
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtOsgOverlayPolygonModelInstance::DtOsgOverlayPolygonModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgOverlayPolygonModelInstance::~DtOsgOverlayPolygonModelInstance ( )
virtual

DTOR.

makVrv::DtOsgOverlayPolygonModelInstance::DtOsgOverlayPolygonModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtOsgOverlayPolygonModelInstance::DtOsgOverlayPolygonModelInstance ( const DtOsgOverlayPolygonModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtOsgOverlayPolygonModelInstance& makVrv::DtOsgOverlayPolygonModelInstance::operator= ( const DtOsgOverlayPolygonModelInstance )
private

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setModelSet ( int  )
virtual

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

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

Set one of the endpoints of the Polygon.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setRotation ( const osg::Quat &  quat)
virtual

Set the rotation of the polygon.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setOrigin ( const DtVector )
virtual

Sets the origin. Will update geometry.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::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::DtOsgOverlayPolygonModelInstance::origin ( ) const
virtual

Returns the origin.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::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::DtOsgOverlayPolygonModelInstance::removePoint ( int  index)
virtual

Removes the point from the specified index.

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

Sets the 2D offset of a vertex.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::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::DtOsgOverlayPolygonModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the Polygon.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setTexturePath ( const std::string &  texturePath)
virtual

Set the texture file path for the polygon.

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::DtOsgOverlayPolygonModelInstance::setOutlineTexture ( const std::string &  texturePath)
virtual

Sets the texture to use for the outline of the polygon.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setOutlineTexture ( osg::Texture *  texture)
virtual

Sets the texture to use for the outline of the polygon.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setSolidFillCenter ( bool  )
virtual

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

virtual void makVrv::DtOsgOverlayPolygonModelInstance::setNumTextureTiles ( double  numTiles)
virtual

Set the number of times to tile the texture.

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

Sets stipple pattern for the polygon.

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

Set the polygon outline width.

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

Set the polygon outline width.

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

Sets whether the model is visible or not.

Implements makVrv::DtModelInstance.

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

Sets whether or not the polygon is pickable.

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

Sets whether or not mouse events are enabled.

bool makVrv::DtOsgOverlayPolygonModelInstance::eventsEnabled ( ) const

Gets whether or not mouse events are enabled.

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

Sets whether or not polygon is filled.

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

Set the color at the center of the ellipse.

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

Retrieves the inside color.

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

Set the color on the outside of the ellipse.

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

Retrieves the inside color.

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

Retrieves the number of points in the model.

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

Retrieves the point.

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

Sets fill pattern (32x32)

virtual void makVrv::DtOsgOverlayPolygonModelInstance::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::DtOsgOverlayPolygonModelInstance::setChannelInstance ( DtChannel ,
int  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::DtOsgOverlayPolygonModelInstance::vertexList ( ) const
virtual

Returns the vertex information for this polygon.

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

Sets all the points for this polygon.

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

Sets the vertex information for this polygon.

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

Returns the list of vertices.

virtual void makVrv::DtOsgOverlayPolygonModelInstance::updateGeometry ( )
virtual

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

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

Creates the appropriate polygon (filled out outline) and sets points.

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

Updates the colors of the object.

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

Sets a polygon vertex's position.

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

Update texture information with zoom and orientation changes.

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

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

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

slot for when the coordinate system changes

Member Data Documentation

VertexList makVrv::DtOsgOverlayPolygonModelInstance::myVertices
protected
std::vector<DtVector> makVrv::DtOsgOverlayPolygonModelInstance::myPoints
protected
DtPolygon* makVrv::DtOsgOverlayPolygonModelInstance::myPolygon
protected
DtPolygon* makVrv::DtOsgOverlayPolygonModelInstance::myOutlinePolygon
protected
bool makVrv::DtOsgOverlayPolygonModelInstance::myFilled
protected
float makVrv::DtOsgOverlayPolygonModelInstance::myWidth
protected
osg::Vec4 makVrv::DtOsgOverlayPolygonModelInstance::myInnerColor
protected
osg::Vec4 makVrv::DtOsgOverlayPolygonModelInstance::myOuterColor
protected
unsigned int makVrv::DtOsgOverlayPolygonModelInstance::myStipplePattern
protected
int makVrv::DtOsgOverlayPolygonModelInstance::myModelSet
protected
unsigned long long makVrv::DtOsgOverlayPolygonModelInstance::myUserData
protected
bool makVrv::DtOsgOverlayPolygonModelInstance::myEventsEnabled
protected
bool makVrv::DtOsgOverlayPolygonModelInstance::myVisibleFlag
protected
bool makVrv::DtOsgOverlayPolygonModelInstance::myOutline
protected
bool makVrv::DtOsgOverlayPolygonModelInstance::mySolidFillCenter
protected
osg::Vec3d makVrv::DtOsgOverlayPolygonModelInstance::myOrigin
protected
osg::Quat makVrv::DtOsgOverlayPolygonModelInstance::myRotation
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgOverlayPolygonModelInstance::myOutlineTexture
protected
DtChannel* makVrv::DtOsgOverlayPolygonModelInstance::myChannelInstance
protected
int makVrv::DtOsgOverlayPolygonModelInstance::myGroup
protected
DtSignalConnectionManager makVrv::DtOsgOverlayPolygonModelInstance::myConnections
protected
DtCoordinateSystem* makVrv::DtOsgOverlayPolygonModelInstance::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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)