VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::Dt3DGreatCircleArcModelInstance Class Reference

Specialized Line Model instance to draw a 3D arc with styleable segments. More...

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

Public Member Functions

 Dt3DGreatCircleArcModelInstance (DtDe &de)
 CTOR.
virtual ~Dt3DGreatCircleArcModelInstance ()
 DTOR.
virtual void setMaxSubdivisions (int subdivisions)
 The maximum number of subdivisions that will be created when implementing curvature.
virtual void setPreferredSubdivisionSize (double size)
 The preferred size of curvature-related subdivisions.
virtual void setHeightScale (double heightScale)
 This scales the arc height of segments to the arcLength of the segment times the heightScale value.
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition.
- Public Member Functions inherited from makVrv::Dt3DSegmentedLineModelInstance
 Dt3DSegmentedLineModelInstance (DtDe &de)
 CTOR.
virtual ~Dt3DSegmentedLineModelInstance ()
 DTOR.
virtual void setPosition (int vtx, const DtVector &position)
 Set the position of one endpoint of the line.
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)
virtual void setWidth (float width)
 Set the width of the line.
virtual void setColor (float r, float g, float b, float a)
 Set the color of the line.
virtual void setStipplePattern (unsigned int pattern, int repeatFactor)
 Set a stipple pattern for the line.
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.
virtual void setSegmentColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of a particular segment.
virtual void setSegmentLightningStyle (unsigned int segmentIndex, bool enableLightningStyle)
 Turn on or off lightning bolt style for a particular segment.
virtual void setSegmentStartArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's start point.
virtual void setSegmentEndArrow (unsigned int segmentIndex, bool enableArrow)
 Turn on or off the arrow at a segment's end point.
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.
virtual void setSegmentWidth (unsigned int segmentWidth, double width)
 Set the line width of a segment.
virtual void setSegmentStartColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment.
virtual void setSegmentEndColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the end vertex in a segment.
virtual void setTerrainIntersect (bool enabled)
 Set terrain intersection mode.
virtual void setModelSet (int modelSet)
 Set the model set this model instance uses (needed for doing intersections)
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 setDepthTestEnabled (bool enabled)
 Turn on or off depth testing (occlusion); default is true.
virtual void setVisible (bool isVisible)
 Set the line visible or invisible; maintains state.
virtual void setPickable (bool pickable)
 Turn on or off the ability to pick the line. Off by default.
bool pickable () const
 Get whether the arc is pickable.
virtual void update ()
 Indicate that its time to prepare actual scene graph data to be rendered.
- 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.
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
 Get the model instance's root node.
- 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 Member Functions

virtual
Dt3DLineModelInstanceSegmentInterface
createSegment ()
 Create an appropriate segment type.
virtual void updateGeometry ()
 Updates the segment information.
virtual void updateGeometryForVertexBasedSegments ()
 Update segment information for segments defined by the models' position vertices.
virtual void updateVertexBasedSegmentGeometry (int vtx, osg::Vec3d &origin)
 Update the geometry of a singel vertex based segment by index and line origin.
virtual void updateGeometryForPercentageBasedSegments ()
 Update segment information for segments defined by two points and start/end percentages.
virtual double updatePercentageBasedSegmentGeometry (int segIndex, double startPercent)
 Update the geometry of a single percentage based segment by index and start percentage.
virtual void updatePercentageBasedSegmentVisibility (int segIndex)
 Make a percentage based segment visible if necessary.
virtual void updateAllSegmentAttributes ()
 Update the state of the segment attributes.
virtual void updateSegmentAttributes (int seg)
 Update the state of the attributes for the indexed segment.
Dt3DGreatCircleArcModelInstanceSegmentgcSegment (int i)
 Helper method to return properly cast DtGreatCircleArcModelInstanceSegments.
const
Dt3DGreatCircleArcModelInstanceSegment
gcSegment (int i) const
 Helper method to return properly cast DtGreatCircleArcModelInstanceSegments.
Readers for setting instance attributes from a model definition
virtual void readMaxSubdivisions (DtModelDefinition &definition)
virtual void readDefaultHeightScale (DtModelDefinition &definition)
virtual void readPreferredSubdivisionSize (DtModelDefinition &definition)
virtual void readDefaultStipple (DtModelDefinition &definition)
virtual void readDefaultWidth (DtModelDefinition &definition)
virtual void readDefaultColor (DtModelDefinition &definition)
- Protected Member Functions inherited from makVrv::Dt3DSegmentedLineModelInstance
Dt3DLineModelInstanceSegmentlineSegment (int i)
 Helper method to return properly cast Dt3DLineModelInstanceSegment.
const
Dt3DLineModelInstanceSegment
lineSegment (int i) const
 Helper method to return properly cast Dt3DLineModelInstanceSegment.
virtual void updatePickableSegments ()
 Update the pickable segment objects.
virtual void adjustSegmentVisibility (int vtx, bool visible)
 Adjust segment visibility.
virtual void resizeSegments (int size)
 Resize the segments vector to size.
virtual void resizeSegmentAttributes (int size)
 Resize the segment attributes vector to size.
- 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

double myHeightScale
int myMaxSubdivisions
double myPreferredSubdivisionSize
- Protected Attributes inherited from makVrv::Dt3DSegmentedLineModelInstance
std::vector< osg::Vec3d > myVertices
bool myTerrainIntersectMode
int myModelSet
bool myVisible
std::vector< double > mySegmentPercentages
std::vector
< Dt3DLineModelInstanceSegmentInterface * > 
mySegments
osg::ref_ptr< osg::Group > myGroup
DtOsgSegmentPickablemyPickable
double myWidth
 Structure to contain the line segments' attributes.
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
- 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

Private Member Functions

 Dt3DGreatCircleArcModelInstance ()
 Default, unimplemented constructor.
 Dt3DGreatCircleArcModelInstance (const Dt3DGreatCircleArcModelInstance &)
 Unimplemented copy constructor.
Dt3DGreatCircleArcModelInstanceoperator= (const Dt3DGreatCircleArcModelInstance &)
 Unimplemented assignment operator.

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::DtModelInstance
boost::signal< void(DtModelInstance *)> signal_modelInstanceChanged

Detailed Description

Specialized Line Model instance to draw a 3D arc with styleable segments.

Constructor & Destructor Documentation

makVrv::Dt3DGreatCircleArcModelInstance::Dt3DGreatCircleArcModelInstance ( DtDe de)

CTOR.

virtual makVrv::Dt3DGreatCircleArcModelInstance::~Dt3DGreatCircleArcModelInstance ( )
virtual

DTOR.

makVrv::Dt3DGreatCircleArcModelInstance::Dt3DGreatCircleArcModelInstance ( )
private

Default, unimplemented constructor.

makVrv::Dt3DGreatCircleArcModelInstance::Dt3DGreatCircleArcModelInstance ( const Dt3DGreatCircleArcModelInstance )
private

Unimplemented copy constructor.

Member Function Documentation

virtual void makVrv::Dt3DGreatCircleArcModelInstance::setMaxSubdivisions ( int  subdivisions)
virtual

The maximum number of subdivisions that will be created when implementing curvature.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::setPreferredSubdivisionSize ( double  size)
virtual

The preferred size of curvature-related subdivisions.

This will only be honored up to the point at which it causes maxSubdivisions to be exceeded

virtual void makVrv::Dt3DGreatCircleArcModelInstance::setHeightScale ( double  heightScale)
virtual

This scales the arc height of segments to the arcLength of the segment times the heightScale value.

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

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

Unimplemented assignment operator.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::readMaxSubdivisions ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::Dt3DGreatCircleArcModelInstance::readDefaultHeightScale ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::Dt3DGreatCircleArcModelInstance::readPreferredSubdivisionSize ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::Dt3DGreatCircleArcModelInstance::readDefaultStipple ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::Dt3DGreatCircleArcModelInstance::readDefaultWidth ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::Dt3DGreatCircleArcModelInstance::readDefaultColor ( DtModelDefinition definition)
protectedvirtual
virtual Dt3DLineModelInstanceSegmentInterface* makVrv::Dt3DGreatCircleArcModelInstance::createSegment ( )
protectedvirtual

Create an appropriate segment type.

Reimplemented from makVrv::Dt3DSegmentedLineModelInstance.

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

Updates the segment information.

Reimplemented from makVrv::Dt3DSegmentedLineModelInstance.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::updateGeometryForVertexBasedSegments ( )
protectedvirtual

Update segment information for segments defined by the models' position vertices.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::updateVertexBasedSegmentGeometry ( int  vtx,
osg::Vec3d &  origin 
)
protectedvirtual

Update the geometry of a singel vertex based segment by index and line origin.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::updateGeometryForPercentageBasedSegments ( )
protectedvirtual

Update segment information for segments defined by two points and start/end percentages.

virtual double makVrv::Dt3DGreatCircleArcModelInstance::updatePercentageBasedSegmentGeometry ( int  segIndex,
double  startPercent 
)
protectedvirtual

Update the geometry of a single percentage based segment by index and start percentage.

Returns this segment's end percentage (which equals the next segment's start percentage)

virtual void makVrv::Dt3DGreatCircleArcModelInstance::updatePercentageBasedSegmentVisibility ( int  segIndex)
protectedvirtual

Make a percentage based segment visible if necessary.

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

Update the state of the segment attributes.

Reimplemented from makVrv::Dt3DSegmentedLineModelInstance.

virtual void makVrv::Dt3DGreatCircleArcModelInstance::updateSegmentAttributes ( int  seg)
protectedvirtual

Update the state of the attributes for the indexed segment.

Dt3DGreatCircleArcModelInstanceSegment& makVrv::Dt3DGreatCircleArcModelInstance::gcSegment ( int  i)
protected

Helper method to return properly cast DtGreatCircleArcModelInstanceSegments.

const Dt3DGreatCircleArcModelInstanceSegment& makVrv::Dt3DGreatCircleArcModelInstance::gcSegment ( int  i) const
protected

Helper method to return properly cast DtGreatCircleArcModelInstanceSegments.

Member Data Documentation

double makVrv::Dt3DGreatCircleArcModelInstance::myHeightScale
protected
int makVrv::Dt3DGreatCircleArcModelInstance::myMaxSubdivisions
protected
double makVrv::Dt3DGreatCircleArcModelInstance::myPreferredSubdivisionSize
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)