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

vrvGraphics-based implementation of 2D Grid Lines on geocentric databases More...

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

Public Member Functions

 DtGeocentricGridLinesDrawer (DtDe &de)
 CTOR.
virtual ~DtGeocentricGridLinesDrawer ()
 DTOR.
virtual void drawGridLines ()
 Main entry point - draw the geocentric grid lines.
virtual void setScale (double scale)
 Set the current observer 2D scale.
virtual void setObserverPosition (const DtVector &position)
 Set the observer position.
virtual void setChannelDimensions (int startChannelX, int startChannelY, int endChannelX, int endChannelY)
 Override to set up expansion values.
- Public Member Functions inherited from makVrv::DtGridLinesDrawer
 DtGridLinesDrawer (DtDe &de)
 Default CTOR.
virtual ~DtGridLinesDrawer ()
 Virtual DTOR.
virtual void setChannel (DtOsgChannel *channel)
 Set the channel to draw the grid lines on.
virtual void setupOverlay ()
 Get the overlay to use for our channel.
virtual void setupFont ()
 Get the font to use fron the font manager.
virtual double lookupClosestLatLonSpacing (double minimumSpacingRadians)
 Find the best allowable lat,lon spacing given the minimum requirement.
virtual double lookupClosestCartesianSpacing (double minimumSpacing)
 Find the best allowable cartesian spacing given the minimum requirement.
- Public Member Functions inherited from makVrv::DtGridLinesParameters
 DtGridLinesParameters ()
 CTOR.
virtual ~DtGridLinesParameters ()
 DTOR.
 DtGridLinesParameters (const DtGridLinesParameters &orig)
 Copy constructor.
DtGridLinesParametersoperator= (const DtGridLinesParameters &orig)
 \ brief Assignment operator
virtual void setGridType (makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType)
 Set the grid type.
virtual void setUnitType (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType)
 Set the unit type.
virtual void setUnitType (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType)
 Set the unit type.
virtual void setAutoSpacing (bool autoSpacing)
 Set whether auto spacing is used.
virtual void setMinSpacing (int pixels)
 Set the minimum pixel spacing for auto spacing.
virtual void setFixedSpacingAmount (double amount)
 Set the fixed spacing amount.
virtual void setXOffset (double offset)
 Set the x offset for the origin in current units.
virtual void setYOffset (double offset)
 Set the y offset amount in current units.
virtual void setDecimalPlaces (unsigned decimalPlaces)
 Set the number of decimals or, in the case of MGRS, decimalPlaces.
virtual void setMaxGridLines (int maxGridLines)
 Set the max number of grid lines in each direction.
virtual void setEastWestGridLineColor (float r, float g, float b, float a)
 Set the color of east-west grid lines.
virtual void setEastWestLabelColor (float r, float g, float b, float a)
 Set the color of the labels on east-west grid lines.
virtual void setNorthSouthGridLineColor (float r, float g, float b, float a)
 Set the color of north-south grid lines.
virtual void setNorthSouthLabelColor (float r, float g, float b, float a)
 Set the color of the labels north-south grid lines.
virtual void setLabelFont (const std::string &fontName)
 Set the font used for labels.
virtual void setLabelPointSize (int pointSize)
 Set the point size used for labels.
virtual void setLabelXOffset (int pixels)
 Set the offset of labels from the bottom of the screen.
virtual void setLabelYOffset (int pixels)
 Set the offset of labels from the left side of the screen.
virtual void setLabelTextWidth (int width)
 Set the width of the box used to display text in.
virtual void setLabelTextHeight (int height)
 Set the height of the box used to display text in.
virtual void setGridLineWidth (float width)
 Set the width of grid lines.

Protected Types

typedef std::vector
< DtLineSegment * > 
GridLine
typedef std::vector< GridLineGridLineVector
typedef std::vector
< DtTextProxy * > 
LabelArray

Protected Member Functions

virtual void setupReferenceEllipsoid ()
 Set up a reference ellipsoid for the current coordinate system that can be reused for all geodetic coordinate objects.
virtual void setupTopoGeocTransforms ()
 Set up transforms between Geocentric and geodetic coordinates.
virtual bool pointVisible (const DtVector &point) const
 Determine if the geocentric point specified could be visible (ignoring the current observer orientation)
virtual void findPolarSpacing ()
 Determine the spacings to use when one of the poles is visible.
virtual void drawPolarLongitudeLines ()
 Draw the longitude lines when one of the poles is visible.
virtual void drawPolarLatitudeLines ()
 Draw the latitude lines when one of the poles is visible.
virtual void findLatLonWindowDimensions ()
 Find the range of longitude and latitude to draw lines over based on the window dimensions (and scale and observer position)
virtual void findSpacing ()
 Determine the spacings to use when neither pole is visible.
virtual void anchorAndOffsetLines ()
 find the correct starting point for longitude and latitude lines given the current spacing and offsets specified
virtual void drawLongitudeLines ()
 Draw the longitude lines when neither pole is visible.
virtual void drawLatitudeLines ()
 Draw the latitude lines when neither pole is visible.
virtual void createLabel (DtTextProxy *&label, double radians, bool isLongitude)
 Create a label.
virtual void destroyGridLines ()
 Destroy all grid lines.
virtual bool clip3D (const DtVector &pointA, const DtVector &pointB, DtVector &clippedA, DtVector &clippedB) const
 Returns false if A and B are beyond the clip plane.
virtual void clearUnusedLinesAndLabels (int index, GridLineVector &lines, LabelArray &labels)
 Deallocates all segments and labels for indices at and above the provided index in the provided GridLineVector.
virtual void clearUnusedSegments (int index, GridLine &line)
 Deallocates all line segments at and above the provided index in the provided GridLine.
virtual void destroyLinesAndLabels (GridLineVector &lines, LabelArray &labels)
 Deallocates all line segments and all labels in the GridLineVector and label arrays provided.
virtual void resizeLinesAndLabels (GridLineVector &lines, LabelArray &labels, int numLines)
 Set the number of lines to draw in a frame Will resize /cleanup current memory allocations for lines and labels.
virtual bool drawLineSegment (DtLineSegment *&segment, const DtVector &start, const DtVector &end, float *colorArray, bool *pass3D=0)
 Draw a geocentric line segment, if its visible.
virtual GridLinegetSegmentedLine (GridLineVector &lines, int index, int numSegments)
 Returns the line from the line vector at the specified index with enough segment pointers allocated.

Protected Attributes

GridLineVector myLongitudeLines
GridLineVector myLatitudeLines
LabelArray myLongitudeLabels
LabelArray myLatitudeLabels
double myLatSpacing
double myLonSpacing
double myScale
unsigned int myChannelSize
DtVector myObserverPosition
double myObserverLatitude
double myObserverLongitude
int myChannelExpansionX
int myChannelExpansionY
DtVector myClipNormal
double myStartLat
double myEndLat
double myStartLon
double myEndLon
DtCoordTransform myGeocToTopoTransform
DtCoordTransform myTopoToGeocTransform
DtReferenceEllipsoid myReferenceEllipsoid
double myAnchoredStartLat
double myAnchoredEndLat
double myAnchoredStartLon
double myAnchoredEndLon
bool myLatCrossesPole
- Protected Attributes inherited from makVrv::DtGridLinesDrawer
DtDemyDe
DtOsgChannelmyChannel
osg::Matrix myWorldToWindowMatrix
int myStartChannelX
int myStartChannelY
int myEndChannelX
int myEndChannelY
DtOverlayRenderermyOverlayRenderer
DtFontSP myFont
std::vector< doublemyLatLonAllowableSpacings
std::vector< doublemyCartesianAllowableSpacings
- Protected Attributes inherited from makVrv::DtGridLinesParameters
makArchives::DtDisplayUnitsSettingsRecord::CoordSys myGridType
bool myUnitTypeIsAngular
makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits myUnitType
makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits myAngularUnitType
bool myAutoSpacing
int myMinSpacing
double mySpacing
double myXOffset
double myYOffset
unsigned myDecimalPlaces
int myMaxGridLines
float myEastWestGridLineColor [4]
float myEastWestLabelColor [4]
float myNorthSouthGridLineColor [4]
float myNorthSouthLabelColor [4]
std::string myLabelFont
int myLabelPointSize
int myLabelXOffset
int myLabelYOffset
int myLabelTextWidth
int myLabelTextHeight
float myGridLineWidth

Private Member Functions

 DtGeocentricGridLinesDrawer (const DtGeocentricGridLinesDrawer &orig)
 Unimplemented Copy Constructor.
DtGeocentricGridLinesDraweroperator= (const DtGeocentricGridLinesDrawer &rhs)
 Unimplemented assignment operator.

Additional Inherited Members

- Static Protected Member Functions inherited from makVrv::DtGridLinesDrawer
static bool clip (double xMin, double xMax, double yMin, double yMax, double x0src, double y0src, double x1src, double y1src, double &x0clip, double &y0clip, double &x1clip, double &y1clip)
 2D clipping routine. Implements Liang / Barsky Clipping

Detailed Description

vrvGraphics-based implementation of 2D Grid Lines on geocentric databases

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtGeocentricGridLinesDrawer::DtGeocentricGridLinesDrawer ( DtDe de)

CTOR.

virtual makVrv::DtGeocentricGridLinesDrawer::~DtGeocentricGridLinesDrawer ( )
virtual

DTOR.

makVrv::DtGeocentricGridLinesDrawer::DtGeocentricGridLinesDrawer ( const DtGeocentricGridLinesDrawer orig)
private

Unimplemented Copy Constructor.

Member Function Documentation

virtual void makVrv::DtGeocentricGridLinesDrawer::drawGridLines ( )
virtual

Main entry point - draw the geocentric grid lines.

virtual void makVrv::DtGeocentricGridLinesDrawer::setScale ( double  scale)
virtual

Set the current observer 2D scale.

virtual void makVrv::DtGeocentricGridLinesDrawer::setObserverPosition ( const DtVector position)
virtual

Set the observer position.

virtual void makVrv::DtGeocentricGridLinesDrawer::setChannelDimensions ( int  startChannelX,
int  startChannelY,
int  endChannelX,
int  endChannelY 
)
virtual

Override to set up expansion values.

Reimplemented from makVrv::DtGridLinesDrawer.

virtual void makVrv::DtGeocentricGridLinesDrawer::setupReferenceEllipsoid ( )
protectedvirtual

Set up a reference ellipsoid for the current coordinate system that can be reused for all geodetic coordinate objects.

virtual void makVrv::DtGeocentricGridLinesDrawer::setupTopoGeocTransforms ( )
protectedvirtual

Set up transforms between Geocentric and geodetic coordinates.

virtual bool makVrv::DtGeocentricGridLinesDrawer::pointVisible ( const DtVector point) const
protectedvirtual

Determine if the geocentric point specified could be visible (ignoring the current observer orientation)

virtual void makVrv::DtGeocentricGridLinesDrawer::findPolarSpacing ( )
protectedvirtual

Determine the spacings to use when one of the poles is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::drawPolarLongitudeLines ( )
protectedvirtual

Draw the longitude lines when one of the poles is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::drawPolarLatitudeLines ( )
protectedvirtual

Draw the latitude lines when one of the poles is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::findLatLonWindowDimensions ( )
protectedvirtual

Find the range of longitude and latitude to draw lines over based on the window dimensions (and scale and observer position)

virtual void makVrv::DtGeocentricGridLinesDrawer::findSpacing ( )
protectedvirtual

Determine the spacings to use when neither pole is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::anchorAndOffsetLines ( )
protectedvirtual

find the correct starting point for longitude and latitude lines given the current spacing and offsets specified

virtual void makVrv::DtGeocentricGridLinesDrawer::drawLongitudeLines ( )
protectedvirtual

Draw the longitude lines when neither pole is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::drawLatitudeLines ( )
protectedvirtual

Draw the latitude lines when neither pole is visible.

virtual void makVrv::DtGeocentricGridLinesDrawer::createLabel ( DtTextProxy *&  label,
double  radians,
bool  isLongitude 
)
protectedvirtual

Create a label.

virtual void makVrv::DtGeocentricGridLinesDrawer::destroyGridLines ( )
protectedvirtual

Destroy all grid lines.

virtual bool makVrv::DtGeocentricGridLinesDrawer::clip3D ( const DtVector pointA,
const DtVector pointB,
DtVector clippedA,
DtVector clippedB 
) const
protectedvirtual

Returns false if A and B are beyond the clip plane.

True if either/both are not, and returns correctly clipped values

virtual void makVrv::DtGeocentricGridLinesDrawer::clearUnusedLinesAndLabels ( int  index,
GridLineVector lines,
LabelArray labels 
)
protectedvirtual

Deallocates all segments and labels for indices at and above the provided index in the provided GridLineVector.

virtual void makVrv::DtGeocentricGridLinesDrawer::clearUnusedSegments ( int  index,
GridLine line 
)
protectedvirtual

Deallocates all line segments at and above the provided index in the provided GridLine.

virtual void makVrv::DtGeocentricGridLinesDrawer::destroyLinesAndLabels ( GridLineVector lines,
LabelArray labels 
)
protectedvirtual

Deallocates all line segments and all labels in the GridLineVector and label arrays provided.

virtual void makVrv::DtGeocentricGridLinesDrawer::resizeLinesAndLabels ( GridLineVector lines,
LabelArray labels,
int  numLines 
)
protectedvirtual

Set the number of lines to draw in a frame Will resize /cleanup current memory allocations for lines and labels.

virtual bool makVrv::DtGeocentricGridLinesDrawer::drawLineSegment ( DtLineSegment *&  segment,
const DtVector start,
const DtVector end,
float *  colorArray,
bool pass3D = 0 
)
protectedvirtual

Draw a geocentric line segment, if its visible.

Will create if necessary. If the caller wants to know if its 3D-clipped, provide pass3D

virtual GridLine& makVrv::DtGeocentricGridLinesDrawer::getSegmentedLine ( GridLineVector lines,
int  index,
int  numSegments 
)
protectedvirtual

Returns the line from the line vector at the specified index with enough segment pointers allocated.

DtGeocentricGridLinesDrawer& makVrv::DtGeocentricGridLinesDrawer::operator= ( const DtGeocentricGridLinesDrawer rhs)
private

Unimplemented assignment operator.

Member Data Documentation

GridLineVector makVrv::DtGeocentricGridLinesDrawer::myLongitudeLines
protected
GridLineVector makVrv::DtGeocentricGridLinesDrawer::myLatitudeLines
protected
LabelArray makVrv::DtGeocentricGridLinesDrawer::myLongitudeLabels
protected
LabelArray makVrv::DtGeocentricGridLinesDrawer::myLatitudeLabels
protected
double makVrv::DtGeocentricGridLinesDrawer::myLatSpacing
protected
double makVrv::DtGeocentricGridLinesDrawer::myLonSpacing
protected
double makVrv::DtGeocentricGridLinesDrawer::myScale
protected
unsigned int makVrv::DtGeocentricGridLinesDrawer::myChannelSize
protected
DtVector makVrv::DtGeocentricGridLinesDrawer::myObserverPosition
protected
double makVrv::DtGeocentricGridLinesDrawer::myObserverLatitude
protected
double makVrv::DtGeocentricGridLinesDrawer::myObserverLongitude
protected
int makVrv::DtGeocentricGridLinesDrawer::myChannelExpansionX
protected
int makVrv::DtGeocentricGridLinesDrawer::myChannelExpansionY
protected
DtVector makVrv::DtGeocentricGridLinesDrawer::myClipNormal
protected
double makVrv::DtGeocentricGridLinesDrawer::myStartLat
protected
double makVrv::DtGeocentricGridLinesDrawer::myEndLat
protected
double makVrv::DtGeocentricGridLinesDrawer::myStartLon
protected
double makVrv::DtGeocentricGridLinesDrawer::myEndLon
protected
DtCoordTransform makVrv::DtGeocentricGridLinesDrawer::myGeocToTopoTransform
protected
DtCoordTransform makVrv::DtGeocentricGridLinesDrawer::myTopoToGeocTransform
protected
DtReferenceEllipsoid makVrv::DtGeocentricGridLinesDrawer::myReferenceEllipsoid
protected
double makVrv::DtGeocentricGridLinesDrawer::myAnchoredStartLat
protected
double makVrv::DtGeocentricGridLinesDrawer::myAnchoredEndLat
protected
double makVrv::DtGeocentricGridLinesDrawer::myAnchoredStartLon
protected
double makVrv::DtGeocentricGridLinesDrawer::myAnchoredEndLon
protected
bool makVrv::DtGeocentricGridLinesDrawer::myLatCrossesPole
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)