#include <gls_map_view.h>
|
| 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 | MapCenterOffset (const Vector &value) |
|
Vector | MapCenterOffset () |
|
void | ViewLocation (const GeoCoord &value) |
|
GeoCoord | ViewLocation () |
|
void | ViewHeading (const float &value) |
|
float | ViewHeading () |
|
void | ViewHeight (const double &value) |
|
double | ViewHeight () |
|
void | ClipMap (const bool &value) |
|
bool | ClipMap () |
|
DisplayObject * | GetBackgroundObject () |
|
const GeoRect & | GetVisibleRegion () 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 DisplayObject * | CreateInstance () |
|
|
Vector | _mapCenterOffset |
|
GeoCoord | _viewLocation |
|
float | _viewHeading |
|
double | _viewHeight |
|
double | _viewLogicalHeight |
|
bool | _clipMapView |
|
bool | _geoToLogicalMatricesValid |
|
GlsMatrixAffineD | _geoToLogicalMatrix |
|
GlsMatrixAffineD | _logicalToGeoMatrix |
|
GeoRect | _visibleRegion |
|
A GLPolygon must be included as the first child under the GlsMapView. This defines a clipping area for the map display.
disti::GlsMapView::GlsMapView |
( |
bool |
generateInstance = false | ) |
|
Create a new GlsMapView.
- Parameters
-
generateInstance | Whether or not to generate an instance name for this inputdevice |
disti::GlsMapView::~GlsMapView |
( |
| ) |
|
|
virtual |
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
-
geo | The GeoCoord to transform |
logical | Pointer 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.
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 |
|
inline |
Determine the GeoCoord for a given logical coordinate.
- Parameters
-
geo | Vector containing the logical coordinate to transform |
logical | Pointer to a GeoCoord to receive the transformed coordinate |
void disti::GlsMapView::LonLatToLogical |
( |
double |
lon, |
|
|
double |
lat, |
|
|
Vector * |
logical_out |
|
) |
| const |
|
inline |
Transform a lon/lat coordinate to the GlsMapView logical coordinates
- Parameters
-
lon | longitude in degrees |
lat | latitude in degrees |
logical_out | Pointer 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::ViewHeading |
( |
const float & |
value | ) |
|
Set the rotation of the map in degrees (true north).
- Parameters
-
value | desired 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
-
value | new 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:
- gls_map_view.h
- gls_map_view.cpp