GlsMap Toolkit  1.10.3
disti::GlsMapGrid Class Reference

#include <gls_map_grid.h>

+ Inheritance diagram for disti::GlsMapGrid:

Classes

struct  PreviousGridState
 

Public Types

enum  EGridReference { GRID_LAT_LON , GRID_UTM , GRID_MGRS , GRID_UTM_SINGLE }
 
typedef DisplayObject BaseClass
 

Public Member Functions

 GlsMapGrid (bool generateInstance=false)
 
 ~GlsMapGrid () DISTI_METHOD_OVERRIDE
 
void SetAvailableAttributes (unsigned int value) DISTI_METHOD_OVERRIDE
 
DisplayObject * CloneObject (bool generateNames=false) DISTI_METHOD_OVERRIDE
 
void CopyProperties (DisplayObject *src) DISTI_METHOD_OVERRIDE
 
InterfaceListType * GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
 
void GetCppInterfaceDescriptionFree (InterfaceListType *array) DISTI_METHOD_OVERRIDE
 
void PreDraw (const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
 
void Draw (void) DISTI_METHOD_OVERRIDE
 
DisplayObject * Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
 
DisplayObject * handle (DisplayEvent *ev) DISTI_METHOD_OVERRIDE
 
void SetValue (int spec, va_list &args) DISTI_METHOD_OVERRIDE
 
GlsMapView * GetMapView ()
 
void SetColor (const glsColor &value) DISTI_METHOD_OVERRIDE
 
glsColor GetColor () DISTI_METHOD_OVERRIDE
 
EGridReference GetGridReference () const
 
void SetDisplayGeoLatLon (double gridLevel)
 
void SetDisplayUTM (double gridScale)
 
void SetDisplayUTM (double gridScale, int zoneNumber, char latitudeBandLetter)
 

Static Public Member Functions

static DisplayObject * CreateInstance ()
 

Protected Member Functions

bool ShouldUpdateGrid (GlsMapView *view)
 
void DrawPathGeometry ()
 
void DrawGeoLatLon ()
 
void DrawGeoLatLonTransverseMercator ()
 
void DrawUTM ()
 
void DrawUTM (int zone, int latZoneIndex)
 
void AddUTMVertices (int zone, int latZoneIndex, DynamicArray< Vertex > &allVertices)
 

Protected Attributes

DisplayObject * _defaultPathGeometry
 
EGridReference _referenceSystem
 
double _scale
 
int _UTMdrawZone
 
int _UTMdrawLatBand
 
PreviousGridState _previousGridState
 
Vertex * _gridVertices
 
int _numberOfGridVertices
 

Friends

class GlsMapGridEditor
 

Constructor & Destructor Documentation

◆ GlsMapGrid()

disti::GlsMapGrid::GlsMapGrid ( bool  generateInstance = false)

Create a new GlsMapGrid.

Parameters
generateInstanceWhether or not to generate an instance name for this inputdevice

◆ ~GlsMapGrid()

disti::GlsMapGrid::~GlsMapGrid ( )

Destructs a GlsMapGrid object

Member Function Documentation

◆ DrawGeoLatLon()

void disti::GlsMapGrid::DrawGeoLatLon ( )
protected

Draw Lat/Lon based grid

◆ GetGridReference()

EGridReference disti::GlsMapGrid::GetGridReference ( ) const
inline

Get the current grid reference

◆ GetMapView()

GlsMapView * disti::GlsMapGrid::GetMapView ( )
inline
Returns
pointer to the GlsMapView that the symbology will use for rendering or NULL if not found.

◆ SetColor()

void disti::GlsMapGrid::SetColor ( const glsColor &  value)

Set the default color for the lines

Parameters
valuecolor of the line in RGBA

◆ SetDisplayGeoLatLon()

void disti::GlsMapGrid::SetDisplayGeoLatLon ( double  gridLevel)

Set Display Geo Lat/Lon

Parameters
gridLevelis from 1.0 arc-seconds to 20.0 degrees

◆ SetDisplayUTM() [1/2]

void disti::GlsMapGrid::SetDisplayUTM ( double  gridScale)

Set Display in UTM (Universal Transverse Mercator) with a given grid scale (from 10m to 100,000 m) /param gridScale scale of the grid from 10m to 100,000m

◆ SetDisplayUTM() [2/2]

void disti::GlsMapGrid::SetDisplayUTM ( double  gridScale,
int  zoneNumber,
char  latitudeBandLetter 
)

Set Display in UTM (Universal Transverse Mercator) over the specified zone and band with a given grid scale (from 10m to 100,000 m) /param gridScale scale of the grid from 10m to 100,000m /param zoneNumber zone to set the display in from 1 to 60 /param latitudeBandLetter latitude to display

◆ ShouldUpdateGrid()

bool disti::GlsMapGrid::ShouldUpdateGrid ( GlsMapView *  view)
protected

Compares the previous view variables to detect if anything has changed. The previous view variables will also be updated to the view's current state.

Parameters
viewThe object that contains the state of the current view.
Returns
true if any view variables have changed and the grid requires an update.

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