18 #include <matrix/vlVector.h>
19 #include <matrix/coordTransform.h>
20 #include <matrix/referenceEllipsoid.h>
22 #include <boost/unordered_set.hpp>
23 #include <boost/unordered_map.hpp>
53 virtual void drawGridLines();
56 virtual void drawPolarGridLines();
59 virtual void drawMidLatitudeGridLines();
63 virtual void setScale(
double scale );
66 virtual void setObserverPosition(
const DtVector& position );
69 virtual void setChannelDimensions(
int startChannelX,
int startChannelY,
70 int endChannelX,
int endChannelY );
73 virtual void setLatLonLabelsCenteringCutoff(
double alt);
76 virtual void setMgrsMapSheetCutoff(
double altitude);
79 virtual void setGarsPolarLatitudeCutoff(
double lat);
84 virtual void reloadTextFonts();
87 virtual void reloadLabelFonts(std::vector<DtTextProxy*>& labels);
91 virtual void setupReferenceEllipsoid();
94 virtual void setupTopoGeocTransforms();
98 virtual bool pointVisible(
const DtVector& point )
const;
101 virtual void findPolarSpacing();
104 virtual void drawPolarLongitudeLines();
107 virtual void drawPolarLatitudeLines();
111 virtual void findLatLonWindowDimensions();
114 virtual void findSpacing();
118 virtual void anchorAndOffsetLines();
121 virtual void drawLongitudeLines();
124 virtual void drawLatitudeLines();
127 virtual void createLabel(
DtTextProxy*& label,
double radians,
bool isLongitude,
double* endpoints);
130 virtual void destroyGridLines();
134 virtual bool clip3D(
const DtVector& pointA,
const DtVector& pointB,
135 DtVector& clippedA, DtVector& clippedB )
const;
149 virtual void clearUnusedLinesAndLabels(
int index,
GridLineVector& lines,
154 virtual void clearUnusedSegments(
int index,
GridLine& line );
172 virtual bool drawLineSegment(
DtLineSegment*& segment,
const DtVector& start,
173 const DtVector& end,
float* colorArray,
double* endpoints=0,
bool* pass3D = 0);
198 virtual bool drawStandardLongitudeLine(
GridLine& lonLine,
double resolution,
int numSegs,
double curLon,
int& curSeg,
double*endpoints);
204 virtual bool drawNorwayMgrsLongitudeLine(
GridLine& lonLine,
double resolution,
int numSegs,
int& curSeg);
210 virtual bool drawSvalbardMgrsLongitudeLines(
GridLine& lonLine,
double resolution,
int numSegs,
double curLon,
int& curSeg);
214 virtual void drawMapSheetLines();
221 virtual void findMapSheetSpacing();
229 virtual bool anchorMapSheetLines();
235 virtual void clearUnusedLabels(
int index,
LabelArray& labels);
256 virtual void resizeLocators(
SegmentLocator& locator,
int numLines);
259 virtual void clearUnusedLocators(
int index,
SegmentLocator& locator);
267 virtual bool drawUtmLineSegment(
GridLine& line,
SegmentStarts& lineLocator,
int segIndex,
int zone,
char hemisphere,
268 double startEasting,
double startNorthing,
double endEasting,
double endNorthing,
bool constrainEasting=
false);
271 virtual void findEastingLimits(
double lat,
double& minEasting,
double& maxEasting);
283 virtual void drawEastWestMapSheetLines();
293 virtual int drawEastWestMapSheetLineForUtmZone(
GridLine& eastWestLine,
SegmentStarts& lineLocator,
int startSeg,
int zone,
294 char hemisphere,
double northingLine,
int zoneMapSheets,
int numSegs,
int numPartialSegs,
double partialExtra);
300 virtual int drawEastWestZoneInterior(
GridLine& eastWestLine,
SegmentStarts& lineLocator,
int startSeg,
int utmZone,
301 char hemisphere,
double northingLine,
int numSegs,
int startEasting,
int endEasting);
313 virtual void drawNorthSouthMapSheetLines();
320 virtual int drawNorthSouthMapSheetLinesForUtmZone(
int zone,
double maxZoneWidth,
int iLine);
330 virtual bool drawNorthSouthMapSheetLine(
int utmZone,
double eastingLine,
int iLine);
344 virtual bool getGzdAndMapSheet(
const DtVector& geocLoc,
DtUnicode& gzd,
DtUnicode& gzdAndMapSheet);
352 virtual void labelGridZones();
355 virtual bool labelGarsGrid(
double lonValue,
double latValue,
DtGarsPrecision precision,
int labelIndex);
358 virtual void labelGarsGrids();
363 virtual bool labelGridZoneDesignator(
double lonValue,
double latValue,
int labelIndex);
369 virtual bool includeMgrsDesignator(
double lonValue,
double latValue, osg::Vec3& screenPos, DtVector& geocResult);
373 virtual bool includeMgrsDesignator(
double lonValue,
double latValue,
float screenPosX,
374 float screenPosY, DtVector& geocResult);
381 virtual void createGridLineLabel(
DtTextProxy*& label,
double lat,
double lon,
float screenPosX,
float screenPosY,
389 virtual void labelMapSheetLines();
395 virtual bool createMapSheetLabel(
DtTextProxy*& label,
double lat,
double lon,
float screenPosX,
float screenPosY);
399 virtual DtFont::TextAlignment offsetGridBoxLabel(
double xSrc,
double ySrc,
double& xOffset,
double& yOffset,
double myEndLat
Definition: DtGeocentricGridLinesDrawer.h:438
double myAnchoredStartNorthing
Definition: DtGeocentricGridLinesDrawer.h:472
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
LabelArray myGzdLabels
Definition: DtGeocentricGridLinesDrawer.h:455
DtGarsPrecision
Definition: DtGarsUtil.h:15
SegmentLocator myNorthSouthSegmentLocator
Definition: DtGeocentricGridLinesDrawer.h:462
std::vector< DtLineSegment * > GridLine
Definition: DtGeocentricGridLinesDrawer.h:141
std::vector< GridLine > GridLineVector
Definition: DtGeocentricGridLinesDrawer.h:144
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
TextAlignment
Definition: DtFontInterface.h:26
double myLonSpacing
Definition: DtGeocentricGridLinesDrawer.h:422
UsedGridLabels myUsedGzdLabels
Definition: DtGeocentricGridLinesDrawer.h:452
double myAnchoredEndEasting
Definition: DtGeocentricGridLinesDrawer.h:473
DtReferenceEllipsoid myReferenceEllipsoid
Definition: DtGeocentricGridLinesDrawer.h:443
double myStartLat
Definition: DtGeocentricGridLinesDrawer.h:437
double myAnchoredEndLat
Definition: DtGeocentricGridLinesDrawer.h:445
double myObserverLongitude
Definition: DtGeocentricGridLinesDrawer.h:428
SegmentLocator myEastWestSegmentLocator
Definition: DtGeocentricGridLinesDrawer.h:465
double myAnchoredStartLat
Definition: DtGeocentricGridLinesDrawer.h:444
A class for controlling text owned by the TextRenderer.
Definition: DtTextProxy.h:33
Draw 2D Grid Lines on geocentric databases. This class supported two types of grids - basic geodetic ...
Definition: DtGeocentricGridLinesDrawer.h:41
LabelArray myEastWestLabels
Definition: DtGeocentricGridLinesDrawer.h:467
LabelArray myNorthSouthLabels
Definition: DtGeocentricGridLinesDrawer.h:466
std::vector< MgrsSegStart > SegmentStarts
The starting location of each mapsheet line segment drawn for one line.
Definition: DtGeocentricGridLinesDrawer.h:247
double myObserverAltitude
Definition: DtGeocentricGridLinesDrawer.h:429
double myScale
Definition: DtGeocentricGridLinesDrawer.h:423
bool myLatCrossesPole
Definition: DtGeocentricGridLinesDrawer.h:448
UsedGridLabels myUsedMapSheetLabels
Definition: DtGeocentricGridLinesDrawer.h:453
DtVector myClipNormal
Definition: DtGeocentricGridLinesDrawer.h:435
std::vector< DtTextProxy * > LabelArray
Definition: DtGeocentricGridLinesDrawer.h:145
A class which represents a single line segment.
Definition: DtLineSegment.h:23
LabelArray myLatitudeLabels
Definition: DtGeocentricGridLinesDrawer.h:419
LabelArray myMapSheetLabels
Definition: DtGeocentricGridLinesDrawer.h:456
double myLatSpacing
Definition: DtGeocentricGridLinesDrawer.h:421
double myObserverLatitude
Definition: DtGeocentricGridLinesDrawer.h:427
unsigned int myChannelSize
Definition: DtGeocentricGridLinesDrawer.h:425
double myAnchoredEndNorthing
Definition: DtGeocentricGridLinesDrawer.h:474
int myChannelExpansionX
Definition: DtGeocentricGridLinesDrawer.h:430
double myAnchoredStartLon
Definition: DtGeocentricGridLinesDrawer.h:446
bool myGarsCanDraw
Definition: DtGeocentricGridLinesDrawer.h:479
double myEndLon
Definition: DtGeocentricGridLinesDrawer.h:440
GridLineVector myLatitudeLines
Definition: DtGeocentricGridLinesDrawer.h:416
double lon
Definition: DtGeocentricGridLinesDrawer.h:244
double myAnchoredEndLon
Definition: DtGeocentricGridLinesDrawer.h:447
GridLineVector myNorthSouthLines
Definition: DtGeocentricGridLinesDrawer.h:461
Contains the DtGridLinesSettingsRecord class declaration.
LabelArray myGarsGridLabels
Definition: DtGeocentricGridLinesDrawer.h:457
double myStartLon
Definition: DtGeocentricGridLinesDrawer.h:439
LabelArray myLongitudeLabels
Definition: DtGeocentricGridLinesDrawer.h:418
DtCoordTransform myGeocToTopoTransform
Definition: DtGeocentricGridLinesDrawer.h:441
int myChannelExpansionY
Definition: DtGeocentricGridLinesDrawer.h:431
boost::unordered_set< DtUnicode > UsedGridLabels
Definition: DtGeocentricGridLinesDrawer.h:451
Base class with common data / methods for drawing grid lines on projected and geocentric databases \i...
Definition: DtGridLinesDrawer.h:32
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
double myAnchoredStartUtmZone
Definition: DtGeocentricGridLinesDrawer.h:475
Structure / typedefs for segment locators. We store the latitude and longitude of the start of each m...
Definition: DtGeocentricGridLinesDrawer.h:241
double myAnchoredStartEasting
Definition: DtGeocentricGridLinesDrawer.h:471
DtVector myObserverPosition
Definition: DtGeocentricGridLinesDrawer.h:426
GridLineVector myLongitudeLines
Definition: DtGeocentricGridLinesDrawer.h:415
char myAnchoredStartNorthingHemisphere
Definition: DtGeocentricGridLinesDrawer.h:477
double myAnchoredEndUtmZone
Definition: DtGeocentricGridLinesDrawer.h:476
int myMapSheetSpacing
Definition: DtGeocentricGridLinesDrawer.h:469
double lat
Definition: DtGeocentricGridLinesDrawer.h:243
unsigned int myMinChannelDimension
Definition: DtGeocentricGridLinesDrawer.h:424
DtCoordTransform myTopoToGeocTransform
Definition: DtGeocentricGridLinesDrawer.h:442
char myAnchoredEndNorthingHemisphere
Definition: DtGeocentricGridLinesDrawer.h:478
A simple bounding box.
Definition: DtBoundingBox.h:101
std::vector< SegmentStarts > SegmentLocator
A vector of SegmentStarts, one for each line drawn.
Definition: DtGeocentricGridLinesDrawer.h:249
GridLineVector myEastWestLines
Definition: DtGeocentricGridLinesDrawer.h:464