![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
#include <LandscapeMgr.hpp>
Inherits StelModule.
Public Slots | |
| QStringList | getAllLandscapeNames () const |
| QStringList | getAllLandscapeIDs () const |
| const QString & | getCurrentLandscapeID () const |
| bool | setCurrentLandscapeID (const QString &id) |
| QString | getCurrentLandscapeName () const |
| bool | setCurrentLandscapeName (const QString &name) |
| const QString & | getDefaultLandscapeID () const |
| bool | setDefaultLandscapeID (const QString &id) |
| QString | getCurrentLandscapeHtmlDescription () const |
| bool | getFlagLandscape () const |
| void | setFlagLandscape (bool b) |
| bool | getFlagFog () const |
| void | setFlagFog (bool b) |
| bool | getFlagLandscapeSetsLocation () const |
| void | setFlagLandscapeSetsLocation (bool b) |
| bool | getFlagCardinalsPoints () const |
| void | setFlagCardinalsPoints (bool b) |
| Vec3f | getColorCardinalPoints () const |
| void | setColorCardinalPoints (const Vec3f &v) |
| bool | getFlagAtmosphere () const |
| void | setFlagAtmosphere (bool b) |
| float | getAtmosphereFadeDuration () const |
| void | setAtmosphereFadeDuration (float f) |
| void | setAtmosphereBortleLightPollution (int bIndex) |
| int | getAtmosphereBortleLightPollution () |
| void | setZRotation (float d) |
Public Member Functions | |
| virtual void | init () |
| virtual void | draw (StelCore *core) |
| virtual void | update (double deltaTime) |
| virtual void | updateI18n () |
| virtual void | setStelStyle (const QString §ion) |
| virtual double | getCallOrder (StelModuleActionName actionName) const |
| float | getLuminance () |
| bool | loadLandscape (QMap< QString, QString > ¶m) |
| Landscape * | createFromFile (const QString &landscapeFile, const QString &landscapeId) |
This includes landscape textures, fog, atmosphere and cardinal points I decided to put all these elements together in a single class because they are inherently linked, especially when we start moving the observer in altitude.
| virtual void LandscapeMgr::init | ( | ) | [virtual] |
Initialize the LandscapeManager class.
Operations performed:
Implements StelModule.
| virtual void LandscapeMgr::draw | ( | StelCore * | core | ) | [virtual] |
| virtual void LandscapeMgr::update | ( | double | deltaTime | ) | [virtual] |
Update time-dependent state.
Includes:
Implements StelModule.
| virtual void LandscapeMgr::updateI18n | ( | ) | [virtual] |
| virtual void LandscapeMgr::setStelStyle | ( | const QString & | section | ) | [virtual] |
| virtual double LandscapeMgr::getCallOrder | ( | StelModuleActionName | actionName | ) | const [virtual] |
Get the order in which this module will draw it's objects relative to other modules.
Reimplemented from StelModule.
| float LandscapeMgr::getLuminance | ( | ) |
Return the global landscape luminance, for being used e.g for setting eye adaptation.
| bool LandscapeMgr::loadLandscape | ( | QMap< QString, QString > & | param | ) |
Load a landscape based on a hash of parameters mirroring the landscape.ini file and make it the current landscape.
| Landscape* LandscapeMgr::createFromFile | ( | const QString & | landscapeFile, | |
| const QString & | landscapeId | |||
| ) |
Create a new landscape from the files which describe it.
Reads a landscape.ini file which is passed as the first parameter, determines the landscape type, and creates a new object for the landscape of the proper type. The load member is then called, passing both parameters.
| landscapeFile | This is the path to a landscape.ini file. | |
| landscapeId | This is the landscape ID, which is also the name of the directory in which the files (textures and so on) for the landscape reside. |
| QStringList LandscapeMgr::getAllLandscapeNames | ( | ) | const [slot] |
Retrieve list of the names of all the available landscape in the file search path sub-directories of the landscape area.
| QStringList LandscapeMgr::getAllLandscapeIDs | ( | ) | const [slot] |
Retrieve list of the names of all the available landscape in the file search path sub-directories of the landscape area.
| const QString& LandscapeMgr::getCurrentLandscapeID | ( | ) | const [inline, slot] |
Get the current landscape ID.
| bool LandscapeMgr::setCurrentLandscapeID | ( | const QString & | id | ) | [slot] |
Change the current landscape to the landscape with the ID specified.
| id | the ID of the new landscape |
| QString LandscapeMgr::getCurrentLandscapeName | ( | ) | const [slot] |
Get the current landscape name.
| bool LandscapeMgr::setCurrentLandscapeName | ( | const QString & | name | ) | [slot] |
Change the current landscape to the landscape with the name specified.
| name | the name of the new landscape, as found in the landscape:name key of the landscape.ini file. |
| const QString& LandscapeMgr::getDefaultLandscapeID | ( | ) | const [inline, slot] |
Get the default landscape ID.
| bool LandscapeMgr::setDefaultLandscapeID | ( | const QString & | id | ) | [slot] |
Change the default landscape to the landscape with the ID specified.
| id | the ID of the landscape to use by default |
| QString LandscapeMgr::getCurrentLandscapeHtmlDescription | ( | ) | const [slot] |
Return a pseudo HTML formated string with all informations on the current landscape.
| bool LandscapeMgr::getFlagLandscape | ( | ) | const [slot] |
Get flag for displaying Landscape.
| void LandscapeMgr::setFlagLandscape | ( | bool | b | ) | [slot] |
Set flag for displaying Landscape.
| bool LandscapeMgr::getFlagFog | ( | ) | const [slot] |
Get flag for displaying Fog.
| void LandscapeMgr::setFlagFog | ( | bool | b | ) | [slot] |
Set flag for displaying Fog.
| bool LandscapeMgr::getFlagLandscapeSetsLocation | ( | ) | const [inline, slot] |
Return the value of the flag determining if a change of landscape will update the observer location.
| void LandscapeMgr::setFlagLandscapeSetsLocation | ( | bool | b | ) | [inline, slot] |
Set the value of the flag determining if a change of landscape will update the observer location.
| bool LandscapeMgr::getFlagCardinalsPoints | ( | ) | const [slot] |
Get flag for displaying Cardinals Points.
| void LandscapeMgr::setFlagCardinalsPoints | ( | bool | b | ) | [slot] |
Set flag for displaying Cardinals Points.
| Vec3f LandscapeMgr::getColorCardinalPoints | ( | ) | const [slot] |
Get Cardinals Points color.
| void LandscapeMgr::setColorCardinalPoints | ( | const Vec3f & | v | ) | [slot] |
Set Cardinals Points color.
| bool LandscapeMgr::getFlagAtmosphere | ( | ) | const [slot] |
Get flag for displaying Atmosphere.
| void LandscapeMgr::setFlagAtmosphere | ( | bool | b | ) | [slot] |
Set flag for displaying Atmosphere.
| float LandscapeMgr::getAtmosphereFadeDuration | ( | ) | const [slot] |
Get atmosphere fade duration in s.
| void LandscapeMgr::setAtmosphereFadeDuration | ( | float | f | ) | [slot] |
Set atmosphere fade duration in s.
| void LandscapeMgr::setAtmosphereBortleLightPollution | ( | int | bIndex | ) | [slot] |
Set the light pollution following the Bortle Scale.
| int LandscapeMgr::getAtmosphereBortleLightPollution | ( | ) | [slot] |
Get the light pollution following the Bortle Scale.
| void LandscapeMgr::setZRotation | ( | float | d | ) | [slot] |
Set the rotation of the landscape about the z-axis.
This is intended for special uses such as when the landscape consists of a vehicle which might change orientation over time (e.g. a ship).
| d | the rotation angle in degrees as an offset from the originally loaded value. |
1.5.5