VR-Forces 4.6 Class Documentation
 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
makVrv::DtPolygonModelInstance Class Reference

Model instance to draw a polygon. More...

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

Classes

struct  AttachablePolygonParameters

Public Types

typedef std::vector< DtVectorVertexList
- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 The possible states of a control point. More...
typedef boost::unordered_map
< std::string, bool
SensorRegionStateMap
 Dynamic Sensor Region methods.

Public Member Functions

 DtPolygonModelInstance (DtDe &de)
 CTOR.
virtual ~DtPolygonModelInstance ()
 DTOR.
virtual bool realize (DtModelDefinition &definition)
 Realize settings according to model definition.
virtual void setColor (float r, float g, float b, float a)
 Set the color of the Polygon.
virtual void enableLighting (bool lit)
 Set whether the polygon is lit.
virtual void enableColorBlending (bool colorBlend)
 Set whether color blending is used.
virtual void setPosition (int vtx, const DtVector &position)
 Set one of the endpoints of the Polygon.
virtual void setTexturePath (const std::string &texturePath)
 Set the texture file path for the polygon.
virtual void setNumTextureTiles (double numTiles)
 Set the number of times to tile the texture.
virtual void setOrientation (int vtx, const DtTaitBryan &orientation)
 No-op.
virtual void addToConnector (DtOsgSceneConnector *connector)
 Tell the model instance to add itself to the provided node.
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Tell the model instance to remove itself from the provided node.
virtual void setVisible (bool isVisible)
 no-op
virtual void addPoint (const DtVector &point, int index)
 Add a new point to the line at the specified index, or, at the end if index is -1.
virtual const VertexListpoints () const
 Points that make up this polygon.
virtual void setPickable (bool enabled)
 Sets whether or not the line is pickable.
virtual void removePoint (int index)
 Removes the point from the specified index.
virtual void setStipplePattern (unsigned int stipplePattern)
 Sets stipple pattern for the polygon.
virtual void setWidth (float width)
 Set the line width.
virtual int pointCount () const
 Returns the number of points.
virtual DtVector point (int) const
 Returns the index at the given position.
virtual void updateGeometry ()
 Updates all geometry and state.
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR.
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file.
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color
virtual void enableTexture (bool onOff)
virtual osg::Node * rootNode ()
 Get the model instance's root node.
virtual const osg::Node * rootNode () const
virtual osg::Node * sensorNode ()
 Get the model instance's sensor node, .
virtual const osg::Node * sensorNode () const
virtual void addDynamicSensorRegion (const std::string &region)
 Add an active region state.
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 Set the state of an active region.
virtual bool dynamicSensorRegion (const std::string &region)
 Get the current state of the specified sensor region.
SensorRegionStateMap const dynamicSensorRegionMap () const
 Get the map containing all regions and their current states.
virtual void slot_atcGlobalModelEnableChanged ()
 Slot to handle the global alpha to coverage signal for entities.
virtual bool alphaToCoverageEnabled ()
 Get the current setting for alpha to coverage for this model.
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 loop over all this models light points and register them with the light point manager daylightControlled is only used if the light points do not already have a type specified
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR.
virtual ~DtModelInstance ()
 DTOR.
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with.
const DtVectorboundingBoxExtents () const
 Get the bounding box extents of the model instance.
void getBoundingBoxExtents (double &x, double &y, double &z) const
 Get the bounding box extents of the model instance.
const DtVectorboundingBoxCenter () const
 Get the bounding box center of the model instance.
void getBoundingBoxCenter (double &x, double &y, double &z) const
 Get the bounding box center of the model instance.
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
virtual void setContributesToBound (bool trueOrFalse)
 Set whether this model instance contributes to an object's overall bounding volume.
bool contributesToBound () const
 Get whether this model instance contributes to an object's overall bounding volume.

Static Public Attributes

static const
AttachablePolygonParameters 
defaultParameters
 Default values for the polygon parameters.

Protected Member Functions

virtual void buildGeometry (const AttachablePolygonParameters &parameters)
 Build the Polygon's geometry from a parameter set.
virtual void buildState (const AttachablePolygonParameters &parameters)
 Build the Polygon's state from a parameter set.
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
virtual void updateColorBlending ()
 calls update color blending with the model root.
virtual void updateColorBlending (osg::Node *node)
virtual void enableTexture (osg::Node *root, bool onOff)
virtual void updateBoundingBoxViaContents ()
 DtOsgModelInstance (DtDe &de)
 CTOR.
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node.

Protected Attributes

osg::ref_ptr< osg::LineWidth > myLineWidth
osg::ref_ptr< osg::Material > myMaterial
osg::ref_ptr< osg::BlendFunc > myBlendFunc
AttachablePolygonParameters myParameters
 The current parameter set.
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
 Has this model instance had a shader generated for it? Used for classes (ex.
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
std::string myRealizedModelDefinitionName
DtVector myBoundingBoxCenter
DtVector myBoundingBoxExtents
DtVector myBoundingBoxMinimum
DtVector myBoundingBoxMaximum
bool myContributesToBound
bool myColorBlendingEnabled
float myBlendRed
float myBlendBlue
float myBlendGreen
float myBlendAlpha

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition)
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition)
- Public Attributes inherited from makVrv::DtOsgModelInstance
boost::signal< void(const
std::string &) > 
signal_dynamicSensorRegionAdded
 Signal raised when a dynamic sensor region is added.
boost::signal< void(const
std::string &, bool) > 
signal_dynamicSensorRegionChanged
 Signal raised when a dynamic sensor region's state changes.
boost::signal< void(bool)> signal_atcModeEnableChanged
 Signal raised when alpha to coverage for this model is changed.
- Public Attributes inherited from makVrv::DtModelInstance
boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged

Detailed Description

Model instance to draw a polygon.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtPolygonModelInstance::DtPolygonModelInstance ( DtDe de)

CTOR.

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

DTOR.

Member Function Documentation

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

Realize settings according to model definition.

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 Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)