VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::Dt3DSegmentedLineModelInstance Class Reference

Model instance to draw a 3D line with styleable segments. More...

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

Classes

struct  SegmentAttributes
 

Public Member Functions

 Dt3DSegmentedLineModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~Dt3DSegmentedLineModelInstance ()
 DTOR. More...
 
virtual void setPosition (int vtx, const DtVector &position)
 Set the position of one endpoint of the line. More...
 
virtual DtVector removePosition (int vtx)
 Remove the vertex at position vtx Returns the value of the vertex that replaces it (or 0,0,0 if none) More...
 
virtual void setWidth (float width)
 Set the width of the line. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the color of the line. More...
 
virtual void setStipplePattern (unsigned int pattern, int repeatFactor)
 Set a stipple pattern for the line. More...
 
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 Set the style segments to percentages of the total line length The values in segmentPercentages must add up to 1.0. More...
 
virtual void setSegmentColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of a particular segment. More...
 
virtual void setSegmentLightningStyle (unsigned int segmentIndex, bool enableLightningStyle)
 Turn on or off lightning bolt style for a particular segment. More...
 
virtual void setSegmentStartArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's start point. More...
 
virtual void setSegmentEndArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's end point. More...
 
virtual void setSegmentStipplePattern (unsigned int segmentIndex, unsigned int stipplePattern, int repeatFactor)
 Set the line stipple pattern for a segment, according to the OpenGL line stippling specification. More...
 
virtual void setSegmentWidth (unsigned int segmentWidth, double width)
 Set the line width of a segment. More...
 
virtual void setSegmentStartColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment. More...
 
virtual void setSegmentEndColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the end vertex in a segment. More...
 
virtual void setTerrainIntersect (bool enabled)
 Set terrain intersection mode. More...
 
virtual void setModelSet (int modelSet)
 Set the model set this model instance uses (needed for doing intersections) More...
 
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition. More...
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 Tell the model instance to add itself to the provided node. More...
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Tell the model instance to remove itself from the provided node. More...
 
virtual void setDepthTestEnabled (bool enabled)
 Turn on or off depth testing (occlusion); default is true. More...
 
virtual void setVisible (bool isVisible)
 Set the line visible or invisible; maintains state. More...
 
virtual void setPickable (bool pickable)
 Turn on or off the ability to pick the line. Off by default. More...
 
bool pickable () const
 Get whether the arc is pickable. More...
 
virtual void update ()
 Indicate that its time to prepare actual scene graph data to be rendered. More...
 
virtual const std::vector
< DtVector > & 
points () const
 Returns the points associated with this line. More...
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR. More...
 
virtual bool cloneInstance (DtModelDefinition &definition)
 Attempt to clone the basic geometry. More...
 
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file. More...
 
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. More...
 
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color More...
 
virtual void enableTexture (bool onOff)
 
virtual osg::Node * rootNode ()
 Get the model instance's root node. More...
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 Get the model instance's sensor node, . More...
 
virtual const osg::Node * sensorNode () const
 
virtual void addDynamicSensorRegion (const std::string &region)
 Add an active region state. More...
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 Set the state of an active region. More...
 
virtual bool dynamicSensorRegion (const std::string &region)
 Get the current state of the specified sensor region. More...
 
SensorRegionStateMap const dynamicSensorRegionMap () const
 Get the map containing all regions and their current states. More...
 
virtual void slot_atcGlobalModelEnableChanged ()
 Slot to handle the global alpha to coverage signal for entities. More...
 
virtual bool alphaToCoverageEnabled ()
 Get the current setting for alpha to coverage for this model. More...
 
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 More...
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtModelInstance ()
 DTOR. More...
 
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with. More...
 
const DtVectorboundingBoxExtents () const
 Get the bounding box extents of the model instance. More...
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 Get the bounding box extents of the model instance. More...
 
const DtVectorboundingBoxCenter () const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the bounding box min/max of the model instance. More...
 
const DtVectorallGeometryboundingBoxExtents () const
 functions for getting the allGeometry versions of the extents (they are calculated by traversing as if all switch paths are active) More...
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 Get the all geometry version of bounding box extents of the model instance. More...
 
const DtVectorallGeometryboundingBoxCenter () const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the all geometry version of bounding box min/max of the model instance. More...
 
virtual void setContributesToBound (bool trueOrFalse)
 Set whether this model instance contributes to an object's overall bounding volume. More...
 
bool contributesToBound () const
 Get whether this model instance contributes to an object's overall bounding volume. More...
 

Protected Member Functions

virtual
Dt3DLineModelInstanceSegmentInterface
createSegment ()
 Create an appropriate segment type. More...
 
Dt3DLineModelInstanceSegmentlineSegment (int i)
 Helper method to return properly cast Dt3DLineModelInstanceSegment. More...
 
const
Dt3DLineModelInstanceSegment
lineSegment (int i) const
 Helper method to return properly cast Dt3DLineModelInstanceSegment. More...
 
virtual void updatePickableSegments ()
 Update the pickable segment objects. More...
 
virtual void adjustSegmentVisibility (int vtx, bool visible)
 Adjust segment visibility. More...
 
virtual void resizeSegments (int size)
 Resize the segments vector to size. More...
 
virtual void resizeSegmentAttributes (int size)
 Resize the segment attributes vector to size. More...
 
virtual void updateGeometry ()
 Update the visibility, endpoints, etc. of the segments. More...
 
virtual void updateAllSegmentAttributes ()
 Update the state of the segment attributes. More...
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
virtual void updateColorBlending ()
 calls update color blending with the model root. More...
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
 DtOsgModelInstance (DtDe &de)
 CTOR. More...
 
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node. More...
 

Protected Attributes

std::vector< DtVectormyVertices
 
bool myTerrainIntersectMode
 
int myModelSet
 
bool myVisible
 
std::vector< doublemySegmentPercentages
 
std::vector
< Dt3DLineModelInstanceSegmentInterface * > 
mySegments
 
osg::ref_ptr< osg::Group > myGroup
 
DtOsgSegmentPickablemyPickable
 
double myWidth
 Structure to contain the line segments' attributes. More...
 
osg::Vec4 myColor
 
unsigned int myStipplePattern
 
int myStippleRepeat
 
bool mySegmentAttributesDirty
 
bool myGeometryDirty
 
std::vector< SegmentAttributesmySegmentAttributes
 
- 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. More...
 
- 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

 Dt3DSegmentedLineModelInstance ()
 Default, unimplemented constructor. More...
 
 Dt3DSegmentedLineModelInstance (const Dt3DSegmentedLineModelInstance &)
 Unimplemented copy constructor. More...
 
Dt3DSegmentedLineModelInstanceoperator= (const Dt3DSegmentedLineModelInstance &)
 Unimplemented assignment operator. More...
 

Additional Inherited Members

- 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. More...
 
- 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::signal< void(const
std::string &) > 
signal_dynamicSensorRegionAdded
 Signal raised when a dynamic sensor region is added. More...
 
boost::signal< void(const
std::string &, bool) > 
signal_dynamicSensorRegionChanged
 Signal raised when a dynamic sensor region's state changes. More...
 
boost::signal< void(bool)> signal_atcModeEnableChanged
 Signal raised when alpha to coverage for this model is changed. More...
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged
 

Detailed Description

Model instance to draw a 3D line with styleable segments.

Constructor & Destructor Documentation

makVrv::Dt3DSegmentedLineModelInstance::Dt3DSegmentedLineModelInstance ( DtDe de)

CTOR.

virtual makVrv::Dt3DSegmentedLineModelInstance::~Dt3DSegmentedLineModelInstance ( )
virtual

DTOR.

makVrv::Dt3DSegmentedLineModelInstance::Dt3DSegmentedLineModelInstance ( )
private

Default, unimplemented constructor.

makVrv::Dt3DSegmentedLineModelInstance::Dt3DSegmentedLineModelInstance ( const Dt3DSegmentedLineModelInstance )
private

Unimplemented copy constructor.

Member Function Documentation

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

Set the position of one endpoint of the line.

Reimplemented in makVrf::DtVrf3DSegmentedLineModelInstance.

virtual DtVector makVrv::Dt3DSegmentedLineModelInstance::removePosition ( int  vtx)
virtual

Remove the vertex at position vtx Returns the value of the vertex that replaces it (or 0,0,0 if none)

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

Set the width of the line.

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

Set the color of the line.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setStipplePattern ( unsigned int  pattern,
int  repeatFactor 
)
virtual

Set a stipple pattern for the line.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setStyleSegments ( const std::vector< double > &  segmentPercentages)
virtual

Set the style segments to percentages of the total line length The values in segmentPercentages must add up to 1.0.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of a particular segment.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentLightningStyle ( unsigned int  segmentIndex,
bool  enableLightningStyle 
)
virtual

Turn on or off lightning bolt style for a particular segment.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentStartArrow ( unsigned int  segmentIndex,
bool  enableArrow 
)
virtual

Turn on or off the arrow at a segment's start point.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentEndArrow ( unsigned int  segmentIndex,
bool  enableArrow 
)
virtual

Turn on or off the arrow at a segment's end point.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentStipplePattern ( unsigned int  segmentIndex,
unsigned int  stipplePattern,
int  repeatFactor 
)
virtual

Set the line stipple pattern for a segment, according to the OpenGL line stippling specification.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentWidth ( unsigned int  segmentWidth,
double  width 
)
virtual

Set the line width of a segment.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentStartColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the firt vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setSegmentEndColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the end vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setTerrainIntersect ( bool  enabled)
virtual

Set terrain intersection mode.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setModelSet ( int  modelSet)
virtual

Set the model set this model instance uses (needed for doing intersections)

virtual bool makVrv::Dt3DSegmentedLineModelInstance::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.

Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.

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

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

Reimplemented from makVrv::DtOsgModelInstance.

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

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

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setDepthTestEnabled ( bool  enabled)
virtual

Turn on or off depth testing (occlusion); default is true.

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

Set the line visible or invisible; maintains state.

Implements makVrv::DtModelInstance.

virtual void makVrv::Dt3DSegmentedLineModelInstance::setPickable ( bool  pickable)
virtual

Turn on or off the ability to pick the line. Off by default.

bool makVrv::Dt3DSegmentedLineModelInstance::pickable ( ) const

Get whether the arc is pickable.

virtual void makVrv::Dt3DSegmentedLineModelInstance::update ( )
virtual

Indicate that its time to prepare actual scene graph data to be rendered.

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

Returns the points associated with this line.

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

Unimplemented assignment operator.

virtual Dt3DLineModelInstanceSegmentInterface* makVrv::Dt3DSegmentedLineModelInstance::createSegment ( )
protectedvirtual

Create an appropriate segment type.

Reimplemented in makVrf::DtVrf3DSegmentedLineModelInstance, and makVrv::Dt3DGreatCircleArcModelInstance.

Dt3DLineModelInstanceSegment& makVrv::Dt3DSegmentedLineModelInstance::lineSegment ( int  i)
protected

Helper method to return properly cast Dt3DLineModelInstanceSegment.

const Dt3DLineModelInstanceSegment& makVrv::Dt3DSegmentedLineModelInstance::lineSegment ( int  i) const
protected

Helper method to return properly cast Dt3DLineModelInstanceSegment.

virtual void makVrv::Dt3DSegmentedLineModelInstance::updatePickableSegments ( )
protectedvirtual

Update the pickable segment objects.

virtual void makVrv::Dt3DSegmentedLineModelInstance::adjustSegmentVisibility ( int  vtx,
bool  visible 
)
protectedvirtual

Adjust segment visibility.

also considering the total line visibility

virtual void makVrv::Dt3DSegmentedLineModelInstance::resizeSegments ( int  size)
protectedvirtual

Resize the segments vector to size.

virtual void makVrv::Dt3DSegmentedLineModelInstance::resizeSegmentAttributes ( int  size)
protectedvirtual

Resize the segment attributes vector to size.

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

Update the visibility, endpoints, etc. of the segments.

Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.

virtual void makVrv::Dt3DSegmentedLineModelInstance::updateAllSegmentAttributes ( )
protectedvirtual

Update the state of the segment attributes.

Reimplemented in makVrv::Dt3DGreatCircleArcModelInstance.

Member Data Documentation

std::vector<DtVector> makVrv::Dt3DSegmentedLineModelInstance::myVertices
protected
bool makVrv::Dt3DSegmentedLineModelInstance::myTerrainIntersectMode
protected
int makVrv::Dt3DSegmentedLineModelInstance::myModelSet
protected
bool makVrv::Dt3DSegmentedLineModelInstance::myVisible
protected
std::vector<double> makVrv::Dt3DSegmentedLineModelInstance::mySegmentPercentages
protected
std::vector<Dt3DLineModelInstanceSegmentInterface*> makVrv::Dt3DSegmentedLineModelInstance::mySegments
protected
osg::ref_ptr<osg::Group> makVrv::Dt3DSegmentedLineModelInstance::myGroup
protected
DtOsgSegmentPickable* makVrv::Dt3DSegmentedLineModelInstance::myPickable
protected
double makVrv::Dt3DSegmentedLineModelInstance::myWidth
protected

Structure to contain the line segments' attributes.

osg::Vec4 makVrv::Dt3DSegmentedLineModelInstance::myColor
protected
unsigned int makVrv::Dt3DSegmentedLineModelInstance::myStipplePattern
protected
int makVrv::Dt3DSegmentedLineModelInstance::myStippleRepeat
protected
bool makVrv::Dt3DSegmentedLineModelInstance::mySegmentAttributesDirty
protected
bool makVrv::Dt3DSegmentedLineModelInstance::myGeometryDirty
protected
std::vector<SegmentAttributes> makVrv::Dt3DSegmentedLineModelInstance::mySegmentAttributes
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)