GlsMap Toolkit  1.8.0
disti::GlsMapView Class Reference

#include <gls_map_view.h>

+ Inheritance diagram for disti::GlsMapView:

Public Types

typedef Group BaseClass
 

Public Member Functions

 GlsMapView (bool generateInstance=false)
 
virtual ~GlsMapView ()
 
virtual void SetAvailableAttributes (unsigned int value)
 
virtual DisplayObject * CloneObject (bool generateNames=false)
 
virtual void CopyProperties (DisplayObject *src)
 
virtual InterfaceListType * GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL)
 
virtual void GetCppInterfaceDescriptionFree (InterfaceListType *array)
 
virtual void PreDraw (const OpenGLMatrices &parentMatrices, Culler &culler)
 
virtual void Draw (void)
 
virtual DisplayObject * Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
 
virtual DisplayObject * handle (DisplayEvent *ev)
 
virtual void SetValue (int spec, va_list &args)
 
void SetProjectionType (ProjectionType value)
 
ProjectionType GetProjectionType () const
 
void MapCenterOffset (const Vector &value)
 
Vector MapCenterOffset ()
 
void ViewLocation (const GeoCoord &value)
 
GeoCoord ViewLocation ()
 
void SetProjectionOffset (const GeoCoord &value)
 
GeoCoord GetProjectionOffset ()
 
void ViewHeading (const float &value)
 
float ViewHeading ()
 
void ViewHeight (const double &value)
 
double ViewHeight ()
 
void ClipMap (const bool &value)
 
bool ClipMap ()
 
DisplayObject * GetBackgroundObject ()
 
const GeoRectGetVisibleRegion () const
 
void LonLatToLogical (double lon, double lat, Vector *logical_out) const
 
void GeoCoordToLogical (const GeoCoord &geo, Vector *logical) const
 
void LogicalToGeoCoord (const Vector &logical, GeoCoord *geo) const
 
const GlsMatrixAffineD & GetGeoToLogicalMatrix () const
 
double ViewLogicalHeight (void) const
 
void CalcGeoToLogicalMatrix () const
 
void CalcVisibleRegion () const
 

Static Public Member Functions

static DisplayObject * CreateInstance ()
 

Protected Member Functions

void VisibleRegionCheckVert (const Vector &v, GeoRect &rect) const
 

Protected Attributes

ProjectionType _projectionType
 
GeoCoord _projectionOffset
 
Vector _mapCenterOffset
 
GeoCoord _viewLocation
 
float _viewHeading
 
double _viewHeight
 
double _viewLogicalHeight
 
bool _clipMapView
 
bool _geoToLogicalMatricesValid
 
GlsMatrixAffineD _geoToLogicalMatrix
 
GlsMatrixAffineD _logicalToGeoMatrix
 
GeoRect _visibleRegion
 

Friends

class GlsMapViewEditor
 

Detailed Description

A GLPolygon must be included as the first child under the GlsMapView. This defines a clipping area for the map display.

Constructor & Destructor Documentation

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

Create a new GlsMapView.

Parameters
generateInstanceWhether or not to generate an instance name for this inputdevice
disti::GlsMapView::~GlsMapView ( )
virtual

Destructs a GlsMapView object

Member Function Documentation

void disti::GlsMapView::CalcGeoToLogicalMatrix ( ) const

This method not normally called by user. It may change in future versions of GlsMapView.

void disti::GlsMapView::CalcVisibleRegion ( ) const

This method not normally called by user. It may change in future versions of GlsMapView.

void disti::GlsMapView::ClipMap ( const bool &  value)

When true, the contents of the map will be clipped to draw only within the GlsMapView. You may want to disable this if you are using another method to clip/occlude the map.

void disti::GlsMapView::GeoCoordToLogical ( const GeoCoord geo,
Vector *  logical 
) const
inline

Transform a GeoCoord coordinate to the GlsMapView logical coordinates

Parameters
geoThe GeoCoord to transform
logicalPointer to a Vector to receive the transformed logical coordinate
DisplayObject* disti::GlsMapView::GetBackgroundObject ( )
inline
Returns
Pointer to the object that defines the plane of the map or NULL if the object is not found.
const GlsMatrixAffineD& disti::GlsMapView::GetGeoToLogicalMatrix ( ) const
inline
Returns
The matrix used by the GlsMapView to transform lon/lat coordinates to logical coordinates. This matrix may be used to transform Vectors or applied to the OpenGL modelview matrix to allow drawing by passing lon/lat coordinates directly to OpenGL. This matrix is recalculated whenever the GlsMapView is drawn.
GeoCoord disti::GlsMapView::GetProjectionOffset ( )
inline

Get the projection offset that the map is viewing.

Returns
GeoCoord current projection offset for the map being viewed
const GeoRect& disti::GlsMapView::GetVisibleRegion ( ) const
inline

Return a GeoRect that encompasses the visible region. If an object is outside of the visible region, it will not be drawn.

void disti::GlsMapView::LogicalToGeoCoord ( const Vector &  logical,
GeoCoord geo 
) const

Determine the GeoCoord for a given logical coordinate.

Parameters
geoVector containing the logical coordinate to transform
logicalPointer to a GeoCoord to receive the transformed coordinate
void disti::GlsMapView::LonLatToLogical ( double  lon,
double  lat,
Vector *  logical_out 
) const

Transform a lon/lat coordinate to the GlsMapView logical coordinates

Parameters
lonlongitude in degrees
latlatitude in degrees
logical_outPointer to a Vector to receive the transformed logical coordinate
void disti::GlsMapView::MapCenterOffset ( const Vector &  value)

Offset that is applied to the center of the map (in logical coordinates) This does not change the geographical location being displayed by the map, but rather moves the screen position that that map center is placed at. This is the point that the map rotates around when the ViewHeading changes.

void disti::GlsMapView::SetProjectionOffset ( const GeoCoord value)

Set the projection offset for this map. This does not change the geographical location being displayed by the map, but it does affect how each cell is projected.

Parameters
valuethe new offset to be used for projection
void disti::GlsMapView::SetProjectionType ( ProjectionType  value)

Selects the projection type for the map. Legacy behavior (unprojected / equirectangular / plate carree) is the default.

void disti::GlsMapView::ViewHeading ( const float &  value)

Set the rotation of the map in degrees (true north).

Parameters
valuedesired map rotation
float disti::GlsMapView::ViewHeading ( )
inline

Get the rotation of the map in degrees (true north).

Returns
float current rotation for the map being viewed
void disti::GlsMapView::ViewHeight ( const double &  value)

Set the height of the region that the map should display in degrees latitude. The width is determined from the height based on the aspect ratio of the view. Use this to control the the zoom level of the map Useful conversion factors: 1 degree latitude = 60 nautical miles = 111120 meters

void disti::GlsMapView::ViewLocation ( const GeoCoord value)

Set the geographical location that the map is viewing.

Parameters
valuenew geographic location for the map being viewed
GeoCoord disti::GlsMapView::ViewLocation ( )
inline

Get the geographical location that the map is viewing.

Returns
GeoCoord current geographic location for the map being viewed
double disti::GlsMapView::ViewLogicalHeight ( void  ) const
inline

Get the height in logical units of the background object that defines the plane of the map

Returns
height in logical units of the background object that defines the plane of the map

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