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

A prism controlled by control points.

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

Classes

struct  SegmentInformation
 

Public Types

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

 DtExtrudedLineModelInstance (DtDe &de)
 
virtual ~DtExtrudedLineModelInstance ()
 
virtual const std::vector
< DtVector > & 
points () const
 
virtual void addPoint (const DtVector &, int index=-1)
 
virtual void removePoint (int index)
 
virtual void setPosition (int index, const DtVector &)
 
virtual void setLinePoints (const std::vector< DtVector > &)
 
virtual void clearPoints ()
 
virtual bool realize (const DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual void setStipplePattern (unsigned int, int repeatFactor)
 
virtual std::vector
< SegmentInformation
segmentInformation () const
 
virtual void setSegmentInformation (const std::vector< SegmentInformation > &)
 
virtual void setSegmentStipplePattern (int s, unsigned int, int repeatFactor)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void setSegmentColor (int, float r, float g, float b, float a)
 
virtual void setTextureHeight (double height)
 
virtual void setTextureWidth (double width)
 
virtual void setTexture (osg::Texture *texture)
 
virtual void setWidth (float)
 
virtual void setHeight (float)
 
virtual void setDimensions (float width, float height)
 
virtual void setLineWidth (float width)
 
virtual void setScribed (bool b)
 
virtual void setScribeWidth (float)
 
virtual void setScribeColor (float r, float g, float b, float a)
 
virtual void setOcclusionEnabled (bool enabled)
 
virtual void setVisible (bool isVisible)
 
int pointCount () const
 
const DtVectorpoint (int) const
 
virtual void setPickable (bool)
 
bool pickable () const
 
void setOrigin (const DtVector &origin)
 
virtual void setSolid (bool)
 
virtual void update ()
 
virtual void setSegmentEndArrow (int, bool)
 
virtual void setSegmentStartArrow (int, bool)
 
virtual void setArrowSize (double)
 
virtual void setLineStyle (vrvTacticalGraphicUtilities::LineStyle)
 
virtual void setArrowStyle (vrvTacticalGraphicUtilities::ArrowStyle)
 
virtual void channelUpdated (const DtTacticalGraphicModelUpdaterManager::ChannelUpdateData &)
 
virtual void setFixedWidthSizing (bool)
 
virtual void setChannelInstance (DtChannel *)
 
virtual bool hasArrows () const
 
virtual void setHeightLinesEnabled (bool enabled)
 
virtual void setHeightLinesColor (float r, float g, float b, float a)
 
virtual void setHeightLinesSpacing (float spacing)
 
virtual void setHeightLinesModelSetId (DtModelSetId modelSetId)
 
virtual void setUpExtent (float height)
 
virtual void setDownExtent (float height)
 
virtual void setLeftExtent (float height)
 
virtual void setRightExtent (float heigh)
 
- 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 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 ()
 
- 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 Types

typedef std::vector
< DtExtrudedLineModelSegmentInstance * > 
SegmentInformationArray
 

Protected Member Functions

virtual void updateGeometry ()
 
virtual
DtExtrudedLineModelSegmentInstance
createSegment ()
 
virtual void removeSegment (int)
 
std::vector< DtVectorupdatePointsForLineStyle (const std::vector< DtVector > &, std::vector< int > &) const
 
virtual void resizeSegments (int)
 
virtual void updateArrowState ()
 
virtual void updateSizes (double)
 
virtual void updateWithViewResolution (double)
 
- 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::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
 
float myLightingOffClamp
 
DtGeom3dLinesComponentmyLinesComponent
 
bool myHeightLinesEnabled
 
float myHeightLinesColor [4]
 
float myHeightLinesSpacing
 
DtModelSetId myHeightLinesModelSetId
 
- 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

 DtExtrudedLineModelInstance ()
 
 DtExtrudedLineModelInstance (const DtExtrudedLineModelInstance &)
 
DtExtrudedLineModelInstanceoperator= (const DtExtrudedLineModelInstance &)
 

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 &) > 
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::DtExtrudedLineModelInstance::DtExtrudedLineModelInstance ( DtDe de)

CTOR.

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

DTOR.

makVrv::DtExtrudedLineModelInstance::DtExtrudedLineModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtExtrudedLineModelInstance::DtExtrudedLineModelInstance ( const DtExtrudedLineModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

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

Assignment Operator not implemented - Copy not allowed.

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 ( const 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

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.

Set the shape's upwards extrusion extent

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::setHeightLinesEnabled ( bool  enabled)
virtual

Enables or disables height lines applied along line segments.

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

Sets the color for height lines applied along line segments.

virtual void makVrv::DtExtrudedLineModelInstance::setHeightLinesSpacing ( float  spacing)
virtual

Sets the desired spacing for height lines applied along line segments.

virtual void makVrv::DtExtrudedLineModelInstance::setHeightLinesModelSetId ( DtModelSetId  modelSetId)
virtual

Sets the model set that the height lines should be used with.

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
float makVrv::DtExtrudedLineModelInstance::myLightingOffClamp
protected
DtGeom3dLinesComponent* makVrv::DtExtrudedLineModelInstance::myLinesComponent
protected
bool makVrv::DtExtrudedLineModelInstance::myHeightLinesEnabled
protected
float makVrv::DtExtrudedLineModelInstance::myHeightLinesColor[4]
protected
float makVrv::DtExtrudedLineModelInstance::myHeightLinesSpacing
protected
DtModelSetId makVrv::DtExtrudedLineModelInstance::myHeightLinesModelSetId
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)