Updraft  1.0
Open source glider flight visualisation tool.
Updraft::Core::MapManager Class Reference

Map manager is a class providing functions to manipulate with a single map. More...

#include <mapmanager.h>

Collaboration diagram for Updraft::Core::MapManager:

List of all members.

Public Member Functions

 MapManager ()
 MapManager (QString earthFile, QString mapName)
 Creates a new MapManager with map created from the earth file.
void createMap ()
 Creates the map node.
void destroyMap ()
 Destroys the map node.
QString getName ()
 Returns the map name.
osgEarth::MapNode * getMapNode ()
 Gets the osgEarth map node for this map.
osgEarth::Map * getMap ()
 Gets the osgEarth map.
void bindManipulator (MapManipulator *newManipulator)
 Binds a map manipulator to this map.
bool hasElevation ()
 Tells whether the map has any elevation data.
MapObjectgetMapObject ()
 Returns the MapObject representing this map.
QVector< MapLayerInterface * > getMapLayers ()
 Gets all the map layers from the map.
void attach (osg::Group *scene)
 Attaches this map's map node to the scene.
void detach (osg::Group *scene)
 Detaches this map's map node from the scene.

Private Member Functions

QVector< osgEarth::ImageLayer * > getImageLayers ()
 Gets a list of ImageLayers in the map.
QVector
< osgEarth::ElevationLayer * > 
getElevationLayers ()
 Gets a list of ElevationLayers in the map.
QVector< osgEarth::ModelLayer * > getModelLayers ()
 Gets a list of ModelLayers in the map.

Private Attributes

QString earthFileName
 Name of the earth file from which the map was loaded.
QString mapName
 Name of the map displayed in the left pane.
osg::ref_ptr< osgEarth::MapNode > mapNode
 Referenced pointer to this map's map node.
osgEarth::Map * map
 Pointer to the osgEarth::Map object representing this map.
QVector< MapLayerInterface * > mapLayers
 The map layers of this map.
MapLayerGroupInterfacemapLayerGroup
 Group of all the map layers of this map.
MapMapObject mapObject
 Map object used for clicking on this map.

Detailed Description

Map manager is a class providing functions to manipulate with a single map.


Constructor & Destructor Documentation

Updraft::Core::MapManager::MapManager ( QString  earthFile,
QString  mapName 
) [explicit]

Creates a new MapManager with map created from the earth file.

Parameters:
earthFileThe path to the earth file where the map for this map. manager is specified.
mapNameName of the map to be displayed in the left pane.

Member Function Documentation

void Updraft::Core::MapManager::attach ( osg::Group *  scene)

Attaches this map's map node to the scene.

Parameters:
sceneThe scene to which the map node should be attached

Binds a map manipulator to this map.

Parameters:
newManipulatorThe new manipulator to be set for this map.

Creates the map node.

Destroys the map node.

void Updraft::Core::MapManager::detach ( osg::Group *  scene)

Detaches this map's map node from the scene.

Parameters:
sceneThe scene from which the map node should be detached
QVector< osgEarth::ElevationLayer * > Updraft::Core::MapManager::getElevationLayers ( ) [private]

Gets a list of ElevationLayers in the map.

QVector< osgEarth::ImageLayer * > Updraft::Core::MapManager::getImageLayers ( ) [private]

Gets a list of ImageLayers in the map.

osgEarth::Map * Updraft::Core::MapManager::getMap ( )

Gets the osgEarth map.

Returns:
osgEarth map representing this map.

Gets all the map layers from the map.

Returns:
QVector of all child map layers.
osgEarth::MapNode * Updraft::Core::MapManager::getMapNode ( )

Gets the osgEarth map node for this map.

Returns:
Map node that represents this map.

Returns the MapObject representing this map.

The MapObject is used for clicking into the map.

Returns:
MapObject that represents this map.
QVector< osgEarth::ModelLayer * > Updraft::Core::MapManager::getModelLayers ( ) [private]

Gets a list of ModelLayers in the map.

Returns the map name.

Returns:
Name of the map as displayed in the left pane.

Tells whether the map has any elevation data.

Returns:
Whether the map has elevation data.

Member Data Documentation

Name of the earth file from which the map was loaded.

osgEarth::Map* Updraft::Core::MapManager::map [private]

Pointer to the osgEarth::Map object representing this map.

Group of all the map layers of this map.

The map layers of this map.

Name of the map displayed in the left pane.

osg::ref_ptr<osgEarth::MapNode> Updraft::Core::MapManager::mapNode [private]

Referenced pointer to this map's map node.

Map object used for clicking on this map.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines