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 | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtPolygonModelInstance Class Reference

Model instance to draw a polygon.

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

Classes

struct  AttachablePolygonParameters
 

Public Types

typedef std::vector< DtVector > VertexList
 
- 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

 DtPolygonModelInstance (DtDe &de)
 
virtual ~DtPolygonModelInstance ()
 
virtual bool realize (const DtModelDefinition &definition)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void enableLighting (bool lit)
 
virtual void enableColorBlending (bool colorBlend)
 
virtual void setPosition (int vtx, const DtVector &position)
 
virtual void setTexturePath (const std::string &texturePath)
 
virtual void setNumTextureTiles (double numTiles)
 
virtual void setOrientation (int vtx, const DtTaitBryan &orientation)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual void setVisible (bool isVisible)
 
virtual void addPoint (const DtVector &point, int index)
 
virtual const VertexListpoints () const
 
virtual void setPickable (bool enabled)
 
virtual void removePoint (int index)
 
virtual void setStipplePattern (unsigned int stipplePattern)
 
virtual void setWidth (float width)
 
virtual int pointCount () const
 
virtual DtVector point (int) const
 
virtual void updateGeometry ()
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool cloneInstance (const DtModelDefinition &definition)
 
virtual bool saveModelToFile (const std::string &filename) const
 
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 ()
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
const std::string & realizedDefinitionName () 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
 

Static Public Attributes

static const
AttachablePolygonParameters 
defaultParameters
 

Protected Member Functions

virtual void buildGeometry (const AttachablePolygonParameters &parameters)
 
virtual void buildState (const AttachablePolygonParameters &parameters)
 
- 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

osg::ref_ptr< osg::LineWidth > myLineWidth
 
osg::ref_ptr< osg::Material > myMaterial
 
osg::ref_ptr< osg::BlendFunc > myBlendFunc
 
AttachablePolygonParameters myParameters
 
VertexList myVertices
 
osg::ref_ptr< osg::Geode > myGeode
 
- 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

 DtPolygonModelInstance ()
 
 DtPolygonModelInstance (const DtPolygonModelInstance &)
 
DtPolygonModelInstanceoperator= (const DtPolygonModelInstance &)
 

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::DtOsgModelInstance
boost::signalslib::signal
< void(const std::string
&, bool) > 
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

typedef std::vector<DtVector> makVrv::DtPolygonModelInstance::VertexList

Constructor & Destructor Documentation

makVrv::DtPolygonModelInstance::DtPolygonModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtPolygonModelInstance::~DtPolygonModelInstance ( )
virtual

DTOR.

makVrv::DtPolygonModelInstance::DtPolygonModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtPolygonModelInstance::DtPolygonModelInstance ( const DtPolygonModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

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

Assignment Operator not implemented - Copy not allowed.

virtual bool makVrv::DtPolygonModelInstance::realize ( const DtModelDefinition definition)
virtual

Attempt to realize a definition. If the model instance can't realize the definition it should return false. This instance requires the definition be of schema "Polygon".

Reimplemented from makVrv::DtOsgModelInstance.

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

Set the color of the Polygon.

virtual void makVrv::DtPolygonModelInstance::enableLighting ( bool  lit)
virtual

Set whether the polygon is lit.

virtual void makVrv::DtPolygonModelInstance::enableColorBlending ( bool  colorBlend)
virtual

Set whether color blending is used.

Reimplemented from makVrv::DtOsgModelInstance.

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

Set one of the endpoints of the Polygon.

virtual void makVrv::DtPolygonModelInstance::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::DtPolygonModelInstance::setNumTextureTiles ( double  numTiles)
virtual

Set the number of times to tile the texture.

virtual void makVrv::DtPolygonModelInstance::setOrientation ( int  vtx,
const DtTaitBryan &  orientation 
)
virtual

No-op.

virtual void makVrv::DtPolygonModelInstance::addToConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to add itself to the provided node.

Reimplemented from makVrv::DtOsgModelInstance.

Reimplemented in makVrv::DtMovablePolygonModel::DtMovablePolygonModelInstance.

virtual bool makVrv::DtPolygonModelInstance::removeFromConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to remove itself from the provided node.

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtPolygonModelInstance::setVisible ( bool  isVisible)
inlinevirtual

no-op

Implements makVrv::DtModelInstance.

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

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

virtual const VertexList& makVrv::DtPolygonModelInstance::points ( ) const
virtual

Points that make up this polygon.

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

Sets whether or not the line is pickable.

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

Removes the point from the specified index.

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

Sets stipple pattern for the polygon.

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

Set the line width.

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

Returns the number of points.

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

Returns the index at the given position.

virtual void makVrv::DtPolygonModelInstance::updateGeometry ( )
virtual

Updates all geometry and state.

virtual void makVrv::DtPolygonModelInstance::buildGeometry ( const AttachablePolygonParameters parameters)
protectedvirtual

Build the Polygon's geometry from a parameter set.

virtual void makVrv::DtPolygonModelInstance::buildState ( const AttachablePolygonParameters parameters)
protectedvirtual

Build the Polygon's state from a parameter set.

Member Data Documentation

const AttachablePolygonParameters makVrv::DtPolygonModelInstance::defaultParameters
static

Default values for the polygon parameters.

osg::ref_ptr<osg::LineWidth> makVrv::DtPolygonModelInstance::myLineWidth
protected
osg::ref_ptr<osg::Material> makVrv::DtPolygonModelInstance::myMaterial
protected
osg::ref_ptr<osg::BlendFunc> makVrv::DtPolygonModelInstance::myBlendFunc
protected
AttachablePolygonParameters makVrv::DtPolygonModelInstance::myParameters
protected

The current parameter set.

VertexList makVrv::DtPolygonModelInstance::myVertices
protected
osg::ref_ptr<osg::Geode> makVrv::DtPolygonModelInstance::myGeode
protected

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)