Updraft
1.0
Open source glider flight visualisation tool.
|
Map manager is a class providing functions to manipulate with a single map. More...
#include <mapmanager.h>
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. | |
MapObject * | getMapObject () |
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. | |
MapLayerGroupInterface * | mapLayerGroup |
Group of all the map layers of this map. | |
MapMapObject | mapObject |
Map object used for clicking on this map. |
Map manager is a class providing functions to manipulate with a single map.
Updraft::Core::MapManager::MapManager | ( | QString | earthFile, |
QString | mapName | ||
) | [explicit] |
Creates a new MapManager with map created from the earth file.
earthFile | The path to the earth file where the map for this map. manager is specified. |
mapName | Name of the map to be displayed in the left pane. |
void Updraft::Core::MapManager::attach | ( | osg::Group * | scene | ) |
Attaches this map's map node to the scene.
scene | The scene to which the map node should be attached |
void Updraft::Core::MapManager::bindManipulator | ( | MapManipulator * | newManipulator | ) |
Binds a map manipulator to this map.
newManipulator | The new manipulator to be set for this map. |
void Updraft::Core::MapManager::createMap | ( | ) |
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.
scene | The 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 | ( | ) |
QVector< MapLayerInterface * > Updraft::Core::MapManager::getMapLayers | ( | ) |
Gets all the map layers from the map.
osgEarth::MapNode * Updraft::Core::MapManager::getMapNode | ( | ) |
Gets the osgEarth map node for this map.
QVector< osgEarth::ModelLayer * > Updraft::Core::MapManager::getModelLayers | ( | ) | [private] |
Gets a list of ModelLayers in the map.
QString Updraft::Core::MapManager::getName | ( | ) |
Returns the map name.
Tells whether the map has any elevation data.
QString Updraft::Core::MapManager::earthFileName [private] |
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.
QVector<MapLayerInterface*> Updraft::Core::MapManager::mapLayers [private] |
The map layers of this map.
QString Updraft::Core::MapManager::mapName [private] |
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.