Updraft
1.0
Open source glider flight visualisation tool.
|
SceneManager class is a wrapper of the scene, and the scene graph. More...
#include <scenemanager.h>
Public Slots | |
void | redrawScene () |
void | resetNorth () |
void | untilt () |
void | saveHomePosition () |
Public Member Functions | |
SceneManager () | |
~SceneManager () | |
QWidget * | getWidget () |
Returns the drawing widget. | |
osg::Group * | getRoot () |
Returns the root of the scene. | |
osgEarth::MapNode * | getMapNode () |
Returns the map node in the scene. | |
MapManager * | getMapManager () |
Returns the MapManager instance associated with currently displayed map. | |
void | createMaps () |
Let MapManagers re-create the maps. | |
void | destroyMaps () |
Destroy all map nodes. | |
bool | removeGroup (osg::Group *group) |
Removes the group from the root. | |
osg::Group * | getSimpleGroup () |
Returns pointer to the group node for random drawing. | |
void | registerOsgNode (osg::Node *node, MapObject *mapObject) |
Registers the osg node into Updraft for mouse picking. | |
void | unregisterOsgNode (osg::Node *node) |
Unregisters osg node for mouse picking. | |
MapObject * | getNodeMapObject (osg::Node *node) |
Tries to get the associated MapObject for the given node. | |
osgEarth::Util::ElevationManager * | getElevationManager () |
Returns an elevation manager associated with the map that has elevation layer. | |
const osg::EllipsoidModel * | getCurrentMapEllipsoid () |
Returns the ellipsoid model associated with current active map. | |
osgEarth::Util::ObjectPlacer * | getObjectPlacer () |
Returns the osgEarth placer used to place nodes into the scene. | |
osgEarth::Util::Viewpoint | getViewpoint () |
Returns the current viewpoint. | |
Private Slots | |
void | checkedMap (bool value, MapLayerInterface *layer) |
Private Member Functions | |
void | createMapManagers () |
Create map managers from earth files. | |
void | menuItems () |
Create the menu items in main window. | |
void | mapLayerGroup () |
Create the map layer group and fill it with maps. | |
osgEarth::Util::ElevationManager * | createElevationManager () |
osg::GraphicsContext::Traits * | createGraphicsTraits (int x, int y, int w, int h, const std::string &name="", bool windowDecoration=false) |
osgQt::GraphicsWindowQt * | createGraphicsWindow (osg::GraphicsContext::Traits *traits) |
osg::Camera * | createCamera (osg::GraphicsContext::Traits *traits) |
osgEarth::Viewpoint | getHomePosition () |
osgEarth::Util::Viewpoint | getInitialPosition () |
void | startInitialAnimation () |
void | updateCameraProjection () |
void | insertMenuItems () |
double | getAspectRatio () |
Private Attributes | |
osgEarth::Util::ObjectPlacer * | placer |
osgViewer::Viewer * | viewer |
osg::Group * | sceneRoot |
osg::ClearNode * | background |
Node with the background. | |
osgEarth::MapNode * | mapNode |
osg::Group * | simpleGroup |
QVector< MapManager * > | mapManagers |
QVector< MapLayerInterface * > | layers |
int | activeMapIndex |
osg::Camera * | camera |
MapManipulator * | manipulator |
osgEarth::Viewpoint | saveViewpoint |
osgEarth::Util::ElevationManager * | elevationManager |
osgQt::GraphicsWindowQt * | graphicsWindow |
QTimer * | timer |
Timer that triggers the drawing procedure. | |
QHash< osg::Node *, MapObject * > | pickingMap |
Map of osg nodes registered for mouse picking. | |
SettingInterface * | homePositionSetting |
Static Private Attributes | |
static const float | flyToHomeDuration = 1.0 |
SceneManager class is a wrapper of the scene, and the scene graph.
void Updraft::Core::SceneManager::checkedMap | ( | bool | value, |
MapLayerInterface * | layer | ||
) | [private, slot] |
osg::Camera * Updraft::Core::SceneManager::createCamera | ( | osg::GraphicsContext::Traits * | traits | ) | [private] |
osgEarth::Util::ElevationManager * Updraft::Core::SceneManager::createElevationManager | ( | ) | [private] |
osg::GraphicsContext::Traits * Updraft::Core::SceneManager::createGraphicsTraits | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const std::string & | name = "" , |
||
bool | windowDecoration = false |
||
) | [private] |
osgQt::GraphicsWindowQt * Updraft::Core::SceneManager::createGraphicsWindow | ( | osg::GraphicsContext::Traits * | traits | ) | [private] |
void Updraft::Core::SceneManager::createMapManagers | ( | ) | [private] |
Create map managers from earth files.
Let MapManagers re-create the maps.
Destroy all map nodes.
double Updraft::Core::SceneManager::getAspectRatio | ( | ) | [private] |
const osg::EllipsoidModel * Updraft::Core::SceneManager::getCurrentMapEllipsoid | ( | ) |
Returns the ellipsoid model associated with current active map.
osgEarth::Util::ElevationManager * Updraft::Core::SceneManager::getElevationManager | ( | ) |
Returns an elevation manager associated with the map that has elevation layer.
osgEarth::Util::Viewpoint Updraft::Core::SceneManager::getHomePosition | ( | ) | [private] |
osgEarth::Util::Viewpoint Updraft::Core::SceneManager::getInitialPosition | ( | ) | [private] |
Returns the MapManager instance associated with currently displayed map.
osgEarth::MapNode * Updraft::Core::SceneManager::getMapNode | ( | ) |
Returns the map node in the scene.
Note that there must be only one map node in the scene.
MapObject * Updraft::Core::SceneManager::getNodeMapObject | ( | osg::Node * | node | ) |
osgEarth::Util::ObjectPlacer * Updraft::Core::SceneManager::getObjectPlacer | ( | ) |
Returns the osgEarth placer used to place nodes into the scene.
osg::Group* Updraft::Core::SceneManager::getRoot | ( | ) |
Returns the root of the scene.
osg::Group * Updraft::Core::SceneManager::getSimpleGroup | ( | ) |
Returns pointer to the group node for random drawing.
osgEarth::Util::Viewpoint Updraft::Core::SceneManager::getViewpoint | ( | ) |
Returns the current viewpoint.
QWidget * Updraft::Core::SceneManager::getWidget | ( | ) |
Returns the drawing widget.
void Updraft::Core::SceneManager::insertMenuItems | ( | ) | [private] |
void Updraft::Core::SceneManager::mapLayerGroup | ( | ) | [private] |
Create the map layer group and fill it with maps.
void Updraft::Core::SceneManager::menuItems | ( | ) | [private] |
Create the menu items in main window.
void Updraft::Core::SceneManager::redrawScene | ( | ) | [slot] |
void Updraft::Core::SceneManager::registerOsgNode | ( | osg::Node * | node, |
MapObject * | mapObject | ||
) |
bool Updraft::Core::SceneManager::removeGroup | ( | osg::Group * | group | ) |
Removes the group from the root.
void Updraft::Core::SceneManager::resetNorth | ( | ) | [slot] |
void Updraft::Core::SceneManager::saveHomePosition | ( | ) | [slot] |
void Updraft::Core::SceneManager::startInitialAnimation | ( | ) | [private] |
void Updraft::Core::SceneManager::unregisterOsgNode | ( | osg::Node * | node | ) |
Unregisters osg node for mouse picking.
node | The node that should be unregistered |
void Updraft::Core::SceneManager::untilt | ( | ) | [slot] |
void Updraft::Core::SceneManager::updateCameraProjection | ( | ) | [private] |
int Updraft::Core::SceneManager::activeMapIndex [private] |
osg::ClearNode* Updraft::Core::SceneManager::background [private] |
Node with the background.
osg::Camera* Updraft::Core::SceneManager::camera [private] |
osgEarth::Util::ElevationManager* Updraft::Core::SceneManager::elevationManager [private] |
const float Updraft::Core::SceneManager::flyToHomeDuration = 1.0 [static, private] |
osgQt::GraphicsWindowQt* Updraft::Core::SceneManager::graphicsWindow [private] |
QVector<MapLayerInterface*> Updraft::Core::SceneManager::layers [private] |
QVector<MapManager*> Updraft::Core::SceneManager::mapManagers [private] |
osgEarth::MapNode* Updraft::Core::SceneManager::mapNode [private] |
QHash<osg::Node*, MapObject*> Updraft::Core::SceneManager::pickingMap [private] |
Map of osg nodes registered for mouse picking.
osgEarth::Util::ObjectPlacer* Updraft::Core::SceneManager::placer [private] |
osgEarth::Viewpoint Updraft::Core::SceneManager::saveViewpoint [private] |
osg::Group* Updraft::Core::SceneManager::sceneRoot [private] |
osg::Group* Updraft::Core::SceneManager::simpleGroup [private] |
QTimer* Updraft::Core::SceneManager::timer [private] |
Timer that triggers the drawing procedure.
osgViewer::Viewer* Updraft::Core::SceneManager::viewer [private] |