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 | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtExtrudedLineModelInstance Class Reference

A prism controlled by control points. More...

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

Classes

struct  SegmentInformation
 When requesting information by segment, the structure used to return that information. More...

Public Types

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

 DtExtrudedLineModelInstance (DtDe &de)
 CTOR.
virtual ~DtExtrudedLineModelInstance ()
 DTOR.
virtual const std::vector
< DtVector > & 
points () const
 Returns the list of points.
virtual void addPoint (const DtVector &, int index=-1)
 Add a control point to the end of the control point list if index is -1, or, at the specified index.
virtual void removePoint (int index)
 Remove a control point at the specified index.
virtual void setPosition (int index, const DtVector &)
 Move a control point at the specified index to a new position.
virtual void setLinePoints (const std::vector< DtVector > &)
 Sets the points to be used for the line, replacing any exising and reworking segments as needed.
virtual void clearPoints ()
 Clears out positions and resets geometry.
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition.
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 setStipplePattern (unsigned int, int repeatFactor)
 Sets the stipple pattern of the line.
virtual std::vector
< SegmentInformation
segmentInformation () const
 Returns the information for all segments.
virtual void setSegmentInformation (const std::vector< SegmentInformation > &)
 Sets the information for all the segments.
virtual void setSegmentStipplePattern (int s, unsigned int, int repeatFactor)
 Sets the stipple pattern of the segment.
virtual void setColor (float r, float g, float b, float a)
 Set the color of the line.
virtual void setSegmentColor (int, float r, float g, float b, float a)
 Sets the color for the segment.
virtual void setTextureHeight (double height)
 Set the height of the texture in meters.
virtual void setTextureWidth (double width)
 Set the width of the texture tiles in meters.
virtual void setTexture (osg::Texture *texture)
 Set the shape's texture.
virtual void setWidth (float)
 Sets the width of the line. If there is height, will 0 out height.
virtual void setHeight (float)
 Sets the height of the line ("up/down" the origin point).
virtual void setDimensions (float width, float height)
 Sets the dimensions of the line.
virtual void setLineWidth (float width)
 Sets the width of the line in pixel space, not world.
virtual void setScribed (bool b)
 Sets the line to be scribed (default true)
virtual void setScribeWidth (float)
 Sets the scribe line width.
virtual void setScribeColor (float r, float g, float b, float a)
 Sets the color of the scribe line.
virtual void setOcclusionEnabled (bool enabled)
 Turn on or off occlusion of the line by other objects; default is true.
virtual void setVisible (bool isVisible)
 no-op
int pointCount () const
 Get the number of points in the line.
const DtVectorpoint (int) const
 Get the value of the point at the specified index.
virtual void setPickable (bool)
 Set the line's pickability.
bool pickable () const
 Get if the line is pickable.
void setOrigin (const DtVector &origin)
 Set the line's origin.
virtual void setSolid (bool)
 Sets shape solid or outlined only. If solid is false and scribed is false, line will be effectively invisible.
virtual void update ()
 Called when it's time to update the model instance.
virtual void setSegmentEndArrow (int, bool)
 Sets the arrow to be on/off at the end of the segment (second point)
virtual void setSegmentStartArrow (int, bool)
 Sets the arrow to be on/off at the start of the segment (first point)
virtual void setArrowSize (double)
 Sets the size of the arrow (in pixels)
virtual void setLineStyle (vrvTacticalGraphicUtilities::LineStyle)
 Sets the line style (see DtTacticalGraphicUtilities.h for types)
virtual void setArrowStyle (vrvTacticalGraphicUtilities::ArrowStyle)
 Sets the style of the arrow (see DtTacticalGraphicUtilities.h for types)
virtual void channelUpdated (const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData &)
 Called when a channel is updated from registration of callback with DtTacticalGraphicModelUpdaterManager.
virtual void setFixedWidthSizing (bool)
 For those lines that support it, whether or not the lines sizes when zooming to pixel space (fixed width) or to the database (non-fixed width).
virtual void setChannelInstance (DtChannel *)
 Set to make this model channel specific.
virtual bool hasArrows () const
 Returns true if there are any arrows present.
virtual void setUpExtent (float height)
 Set the shape's upwards extrusion extent.
virtual void setDownExtent (float height)
 Set the shape's downwards extrusion extent.
virtual void setLeftExtent (float height)
 Set the shape's left extrusion extent.
virtual void setRightExtent (float heigh)
 Set the shape's right extrusion extent.
- 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 enableColorBlending (bool b)
 Enable / disable coloring on all models in the scene object Note about enableColorBlending: If this particular model has instancing enabled then this flag is set to false and color blending is handled by the instance manager.
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.

Protected Types

typedef std::vector
< DtExtrudedLineModelSegmentInstance * > 
SegmentInformationArray

Protected Member Functions

virtual void updateGeometry ()
 Rebuild the geometry objects.
virtual
DtExtrudedLineModelSegmentInstance
createSegment ()
 Creates a new segment, adds it to the segment attributes and sets some default values.
virtual void removeSegment (int)
 Removes a segment from the given index.
std::vector< DtVectorupdatePointsForLineStyle (const std::vector< DtVector > &, std::vector< int > &) const
 Creates the points for the line given the line style.
virtual void resizeSegments (int)
 Resizes segments to cover the segment that wants to be changed.
virtual void updateArrowState ()
 If arrows are present connect to channel update in order to dynamically resize as zoom level changes.
virtual void updateSizes (double)
 Updates the arrow sizes modified with the supplied view resolution.
virtual void updateWithViewResolution (double)
 Updates geometry and line style with view resolution.
- 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::Group > myMainTransform
PointVector myLinePoints
PointVector myDisplayPoints
SegmentInformationArray mySegmentAttributes
osg::Vec4 myColor
osg::Vec4 myScribeColor
bool myScribeColorSet
bool myScribed
bool mySolid
bool myGeometryDirty
DtVector myOrigin
osg::ref_ptr< osg::Texture > myTexture
double myTextureWidth
double myTextureHeight
float myLineWidth
float myUpExtent
float myDownExtent
float myLeftExtent
float myRightExtent
unsigned int myStipplePattern
int myRepeatFactor
vrvTacticalGraphicUtilities::LineStyle myLineStyle
vrvTacticalGraphicUtilities::ArrowStyle myArrowStyle
double myArrowSize
double myDisplayArrowSize
bool myFixedWidthSizing
std::vector< intmySegmentsToErase
DtChannelmyChannelInstance
float myScribeWidth
- 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

A prism controlled by control points.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtExtrudedLineModelInstance::DtExtrudedLineModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtExtrudedLineModelInstance::~DtExtrudedLineModelInstance ( )
virtual

DTOR.

Member Function Documentation

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

Returns the list of points.

virtual void makVrv::DtExtrudedLineModelInstance::addPoint ( const DtVector ,
int  index = -1 
)
virtual

Add a control point to the end of the control point list if index is -1, or, at the specified index.

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

Remove a control point at the specified index.

virtual void makVrv::DtExtrudedLineModelInstance::setPosition ( int  index,
const DtVector  
)
virtual

Move a control point at the specified index to a new position.

virtual void makVrv::DtExtrudedLineModelInstance::setLinePoints ( const std::vector< DtVector > &  )
virtual

Sets the points to be used for the line, replacing any exising and reworking segments as needed.

virtual void makVrv::DtExtrudedLineModelInstance::clearPoints ( )
virtual

Clears out positions and resets geometry.

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

Attempt to realize a definition.

If the model instance can't realize the definition it should return false.

Reimplemented from makVrv::DtOsgModelInstance.

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

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

Reimplemented from makVrv::DtOsgModelInstance.

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

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

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtExtrudedLineModelInstance::setStipplePattern ( unsigned  int,
int  repeatFactor 
)
virtual

Sets the stipple pattern of the line.

virtual std::vector<SegmentInformation> makVrv::DtExtrudedLineModelInstance::segmentInformation ( ) const
virtual

Returns the information for all segments.

virtual void makVrv::DtExtrudedLineModelInstance::setSegmentInformation ( const std::vector< SegmentInformation > &  )
virtual

Sets the information for all the segments.

If there is more information than segments currently available then will only use what is necessary to fill the current segments

virtual void makVrv::DtExtrudedLineModelInstance::setSegmentStipplePattern ( int  s,
unsigned  int,
int  repeatFactor 
)
virtual

Sets the stipple pattern of the segment.

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

Set the color of the line.

virtual void makVrv::DtExtrudedLineModelInstance::setSegmentColor ( int  ,
float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color for the segment.

virtual void makVrv::DtExtrudedLineModelInstance::setTextureHeight ( double  height)
virtual

Set the height of the texture in meters.

virtual void makVrv::DtExtrudedLineModelInstance::setTextureWidth ( double  width)
virtual

Set the width of the texture tiles in meters.

virtual void makVrv::DtExtrudedLineModelInstance::setTexture ( osg::Texture *  texture)
virtual

Set the shape's texture.

virtual void makVrv::DtExtrudedLineModelInstance::setUpExtent ( float  height)
virtual

Set the shape's upwards extrusion extent.

Sets the values of the extents of the line. Extents of the line are different than the width or height in that in setting the width or height those are centered around the points. The extents work from the point and move in the direction of the extent in topographic space. For example, if you imagine a straight line, the up extent moves straight up from that line, the down extent straight down, left to the left and right to the right. As the line rotates and orients the extents orient and rotate with that line

virtual void makVrv::DtExtrudedLineModelInstance::setDownExtent ( float  height)
virtual

Set the shape's downwards extrusion extent.

virtual void makVrv::DtExtrudedLineModelInstance::setLeftExtent ( float  height)
virtual

Set the shape's left extrusion extent.

virtual void makVrv::DtExtrudedLineModelInstance::setRightExtent ( float  heigh)
virtual

Set the shape's right extrusion extent.

virtual void makVrv::DtExtrudedLineModelInstance::setWidth ( float  )
virtual

Sets the width of the line. If there is height, will 0 out height.

virtual void makVrv::DtExtrudedLineModelInstance::setHeight ( float  )
virtual

Sets the height of the line ("up/down" the origin point).

If width is set, will 0 out width for the entire line

virtual void makVrv::DtExtrudedLineModelInstance::setDimensions ( float  width,
float  height 
)
virtual

Sets the dimensions of the line.

virtual void makVrv::DtExtrudedLineModelInstance::setLineWidth ( float  width)
virtual

Sets the width of the line in pixel space, not world.

Clears out any existing dimensional size

virtual void makVrv::DtExtrudedLineModelInstance::setScribed ( bool  b)
virtual

Sets the line to be scribed (default true)

virtual void makVrv::DtExtrudedLineModelInstance::setScribeWidth ( float  )
virtual

Sets the scribe line width.

virtual void makVrv::DtExtrudedLineModelInstance::setScribeColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color of the scribe line.

Once set it will always be different than the color of the main polygon

virtual void makVrv::DtExtrudedLineModelInstance::setOcclusionEnabled ( bool  enabled)
virtual

Turn on or off occlusion of the line by other objects; default is true.

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

no-op

Implements makVrv::DtModelInstance.

int makVrv::DtExtrudedLineModelInstance::pointCount ( ) const
inline

Get the number of points in the line.

const DtVector& makVrv::DtExtrudedLineModelInstance::point ( int  ) const

Get the value of the point at the specified index.

virtual void makVrv::DtExtrudedLineModelInstance::setPickable ( bool  )
virtual

Set the line's pickability.

bool makVrv::DtExtrudedLineModelInstance::pickable ( ) const

Get if the line is pickable.

void makVrv::DtExtrudedLineModelInstance::setOrigin ( const DtVector origin)

Set the line's origin.

virtual void makVrv::DtExtrudedLineModelInstance::setSolid ( bool  )
virtual

Sets shape solid or outlined only. If solid is false and scribed is false, line will be effectively invisible.

virtual void makVrv::DtExtrudedLineModelInstance::update ( )
virtual

Called when it's time to update the model instance.

virtual void makVrv::DtExtrudedLineModelInstance::setSegmentEndArrow ( int  ,
bool   
)
virtual

Sets the arrow to be on/off at the end of the segment (second point)

virtual void makVrv::DtExtrudedLineModelInstance::setSegmentStartArrow ( int  ,
bool   
)
virtual

Sets the arrow to be on/off at the start of the segment (first point)

virtual void makVrv::DtExtrudedLineModelInstance::setArrowSize ( double  )
virtual

Sets the size of the arrow (in pixels)

virtual void makVrv::DtExtrudedLineModelInstance::setLineStyle ( vrvTacticalGraphicUtilities::LineStyle  )
virtual

Sets the line style (see DtTacticalGraphicUtilities.h for types)

virtual void makVrv::DtExtrudedLineModelInstance::setArrowStyle ( vrvTacticalGraphicUtilities::ArrowStyle  )
virtual

Sets the style of the arrow (see DtTacticalGraphicUtilities.h for types)

virtual void makVrv::DtExtrudedLineModelInstance::channelUpdated ( const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData )
virtual

Called when a channel is updated from registration of callback with DtTacticalGraphicModelUpdaterManager.

virtual void makVrv::DtExtrudedLineModelInstance::setFixedWidthSizing ( bool  )
virtual

For those lines that support it, whether or not the lines sizes when zooming to pixel space (fixed width) or to the database (non-fixed width).

Default is fixed width. If changing modes, be sure to change the arrow size

virtual void makVrv::DtExtrudedLineModelInstance::setChannelInstance ( DtChannel )
virtual

Set to make this model channel specific.

This means it will only update itself when the channel it is assigned to is updated

virtual bool makVrv::DtExtrudedLineModelInstance::hasArrows ( ) const
virtual

Returns true if there are any arrows present.

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

Rebuild the geometry objects.

virtual DtExtrudedLineModelSegmentInstance* makVrv::DtExtrudedLineModelInstance::createSegment ( )
protectedvirtual

Creates a new segment, adds it to the segment attributes and sets some default values.

virtual void makVrv::DtExtrudedLineModelInstance::removeSegment ( int  )
protectedvirtual

Removes a segment from the given index.

std::vector<DtVector> makVrv::DtExtrudedLineModelInstance::updatePointsForLineStyle ( const std::vector< DtVector > &  ,
std::vector< int > &   
) const
protected

Creates the points for the line given the line style.

virtual void makVrv::DtExtrudedLineModelInstance::resizeSegments ( int  )
protectedvirtual

Resizes segments to cover the segment that wants to be changed.

virtual void makVrv::DtExtrudedLineModelInstance::updateArrowState ( )
protectedvirtual

If arrows are present connect to channel update in order to dynamically resize as zoom level changes.

virtual void makVrv::DtExtrudedLineModelInstance::updateSizes ( double  )
protectedvirtual

Updates the arrow sizes modified with the supplied view resolution.

virtual void makVrv::DtExtrudedLineModelInstance::updateWithViewResolution ( double  )
protectedvirtual

Updates geometry and line style with view resolution.

Member Data Documentation

osg::ref_ptr<osg::Group> makVrv::DtExtrudedLineModelInstance::myMainTransform
protected
PointVector makVrv::DtExtrudedLineModelInstance::myLinePoints
protected
PointVector makVrv::DtExtrudedLineModelInstance::myDisplayPoints
protected
SegmentInformationArray makVrv::DtExtrudedLineModelInstance::mySegmentAttributes
protected
osg::Vec4 makVrv::DtExtrudedLineModelInstance::myColor
protected
osg::Vec4 makVrv::DtExtrudedLineModelInstance::myScribeColor
protected
bool makVrv::DtExtrudedLineModelInstance::myScribeColorSet
protected
bool makVrv::DtExtrudedLineModelInstance::myScribed
protected
bool makVrv::DtExtrudedLineModelInstance::mySolid
protected
bool makVrv::DtExtrudedLineModelInstance::myGeometryDirty
protected
DtVector makVrv::DtExtrudedLineModelInstance::myOrigin
protected
osg::ref_ptr<osg::Texture> makVrv::DtExtrudedLineModelInstance::myTexture
protected
double makVrv::DtExtrudedLineModelInstance::myTextureWidth
protected
double makVrv::DtExtrudedLineModelInstance::myTextureHeight
protected
float makVrv::DtExtrudedLineModelInstance::myLineWidth
protected
float makVrv::DtExtrudedLineModelInstance::myUpExtent
protected
float makVrv::DtExtrudedLineModelInstance::myDownExtent
protected
float makVrv::DtExtrudedLineModelInstance::myLeftExtent
protected
float makVrv::DtExtrudedLineModelInstance::myRightExtent
protected
unsigned int makVrv::DtExtrudedLineModelInstance::myStipplePattern
protected
int makVrv::DtExtrudedLineModelInstance::myRepeatFactor
protected
vrvTacticalGraphicUtilities::LineStyle makVrv::DtExtrudedLineModelInstance::myLineStyle
protected
vrvTacticalGraphicUtilities::ArrowStyle makVrv::DtExtrudedLineModelInstance::myArrowStyle
protected
double makVrv::DtExtrudedLineModelInstance::myArrowSize
protected
double makVrv::DtExtrudedLineModelInstance::myDisplayArrowSize
protected
bool makVrv::DtExtrudedLineModelInstance::myFixedWidthSizing
protected
std::vector<int> makVrv::DtExtrudedLineModelInstance::mySegmentsToErase
protected
DtChannel* makVrv::DtExtrudedLineModelInstance::myChannelInstance
protected
float makVrv::DtExtrudedLineModelInstance::myScribeWidth
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)