vrvGraphics-based implementation of 2D Grid Lines on projected databases \ingroup vrvOsg
More...
Public Member Functions |
| | DtProjectedGridLinesDrawer (DtDe &de) |
| | CTOR.
|
| virtual | ~DtProjectedGridLinesDrawer () |
| | DTOR.
|
| virtual void | drawGridLines () |
| | Draw the grid lines (and labels)
|
| virtual void | setMaxGridLines (int maxGridLines) |
| | Override base class to allocate memory for lines.
|
| virtual void | setWindowDimensions (double startWindowX, double startWindowY, double endWindowX, double endWindowY) |
| | Set the approximate DB dimensions of the view within the unrotated window.
|
| virtual void | setCenter (const osg::Vec2d ¢er) |
| | Set the DB location at the center of the window.
|
| virtual void | setHeading (double heading) |
| | Set the current observer heading.
|
| virtual void | setScale (double scale) |
| | Set the current observer scale.
|
| virtual void | destroyGridLines () |
| | Destroy all grid lines in the current channel.
|
| | 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 | setChannelDimensions (int startChannelX, int startChannelY, int endChannelX, int endChannelY) |
| | Set the channel dimensions.
|
| 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.
|
| | DtGridLinesParameters () |
| | CTOR.
|
| virtual | ~DtGridLinesParameters () |
| | DTOR.
|
| | DtGridLinesParameters (const DtGridLinesParameters &orig) |
| | Copy constructor.
|
| DtGridLinesParameters & | operator= (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 | 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 Member Functions |
| virtual void | drawNorthSouthGridLinesAndLabels () |
| virtual void | drawEastWestGridLinesAndLabels () |
| virtual void | findSpacing () |
| | Determine, based on autoSpacing setting or fixed spacing value, what the grid spacing should be.
|
| virtual void | anchorAndOffsetLines () |
| | Find the range of x's and y's to attempt to draw grid lines for (in database coordinates).
|
| virtual DtUnicode | createLabel (double &xMeters, double yMeters, bool isNorthSouth) |
| | Given x and y in database coordinates, create a label string for the grid line in the coordinate system appropriate for the current grid type.
|
| virtual bool | labelGridBox (double nsValue, double ewValue, int labelIndex) |
| void | convertDegreeSpacingToMeters (double gridSpacing, double &xSpacing, double &ySpacing) const |
| | Convert degree spacing to meters, used to actually draw the lines Note that the spacing may be different for x and y when the units are degrees.
|
| virtual DtFont::TextAlignement | offsetLabel (double xSrc, double ySrc, double &xOffset, double &yOffset, DtBoundingBox &bbox) const |
| | Find the offset and alignment for a label.
|
| virtual DtFont::TextAlignement | offsetGridBoxLabel (double xSrc, double ySrc, double &xOffset, double &yOffset, DtBoundingBox &bbox) const |
| | Find the offset and alignment for a grid box label.
|
| virtual LabelPosition | calcLabelPosition (double x, double y) const |
| | Determine which screen edge a label is closest to.
|
| virtual void | calcDesiredLabelPosition () |
| | Determine which screen edge a label type is supposed to be on.
|
| double | degreesLatitudeToMeters (double x, double y) const |
| | Convert one degree of latitude (on the current flat-earth projected db) into meters.
|
| double | convertToMetersOrDegrees (double value) const |
| virtual double | degreesLongitudeToMeters () const |
| | Convert one degree of longitude (on the current flat-earth projected db) into meters.
|
| virtual double | fixedSpacingAmount () const |
| | Return the fixed spacing amount for the current gridType.
|
| virtual double | xOffset () const |
| | Return the x offset for the current gridType.
|
| virtual double | yOffset () const |
| | Return the y offset for the current gridType.
|
| virtual void | clearUnusedLinesAndLabels (int index, GridLineVector &lines) |
| virtual void | clearUnusedGridBoxLabels (int index) |
| virtual bool | drawGridLineAndLabel (double startX, double startY, double endX, double endY, GridLine &gridLine, float *lineColor, LabelPosition labelPosition, float *labelColor, bool isNorthSouth) |
| virtual void | labelGridBoxes () |
| | Iterate through the grid line intersections, considering them as grid boxes, and request labels from the coordinate display object.
|
Static Protected Member Functions |
| static void | rotate (const DtProjectedGridLinesDrawer::VertexList &in, double rad, DtProjectedGridLinesDrawer::VertexList &out) |
| | Utility function to rotate a list of vertices.
|
| static void | translate (const DtProjectedGridLinesDrawer::VertexList &in, const osg::Vec2 &translation, DtProjectedGridLinesDrawer::VertexList &out) |
| | Utility function to translate a list of vertices.
|
| static void | scale (const DtProjectedGridLinesDrawer::VertexList &in, double s, DtProjectedGridLinesDrawer::VertexList &out) |
| | Utility function to scale a list of vertices.
|
| 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
|
vrvGraphics-based implementation of 2D Grid Lines on projected databases \ingroup vrvOsg