Stellarium
0.16.1
|
Contains all the metadata necessary for a Scenery3d scene, and can be loaded from special .ini files in a scene's folder. More...
#include <SceneInfo.hpp>
Public Member Functions | |
bool | hasLocation () const |
Returns true if the location object is valid. More... | |
bool | hasLookAtFOV () const |
Returns true if the lookat_fov is valid. More... | |
QString | getLocalizedHTMLDescription () const |
Tries to find a description. More... | |
Static Public Member Functions | |
static bool | loadByID (const QString &id, SceneInfo &info) |
Loads the scene metadata associated with this ID (directory) into the given object. Returns true on success. More... | |
static bool | loadByName (const QString &name, SceneInfo &info) |
Convenience method that finds the ID for the given name and calls loadByID. More... | |
static QString | getIDFromName (const QString &name) |
Returns the ID for the given scene name. More... | |
static QStringList | getAllSceneIDs () |
Returns all available scene IDs. More... | |
static QStringList | getAllSceneNames () |
Returns all available scene names. More... | |
static QMap< QString, QString > | getNameToIDMap () |
Builds a mapping of available scene names to the folders they are contained in, similar to the LandscapeMgr's method. More... | |
Public Attributes | |
bool | isValid |
If this is a valid sceneInfo object loaded from file. More... | |
QString | id |
ID of the scene (relative directory) More... | |
QString | fullPath |
The full path to the scene's folder. Other paths (model files) are to be seen relative to this path. More... | |
QString | name |
Name of the scene. More... | |
QString | author |
Author of the scene. More... | |
QString | description |
A description, which can be displayed in the GUI - supporting HTML tags! Note that this description, as stored in the scenery3d.ini, is only meant as a fallback. More... | |
QString | copyright |
Copyright string. More... | |
QString | landscapeName |
The name of the landscape to switch to. The landscape's position is applied on loading. More... | |
QString | modelScenery |
The file name of the scenery .obj model. More... | |
QString | modelGround |
The file name of the optional seperate ground model (used as a heightmap for walking) More... | |
QString | vertexOrder |
Optional string depicting vertex order of models (XYZ, ZXY, ...) More... | |
StelOBJ::VertexOrder | vertexOrderEnum |
The vertex order of the corresponding OBJ file. More... | |
float | camNearZ |
Distance to cam near clipping plane. Default 0.3. More... | |
float | camFarZ |
Distance to cam far clipping plane. Default 10000.0. More... | |
float | shadowFarZ |
An optional shadow far clipping plane, constraining the shadowmaps to a smaller region than is visible. More... | |
float | shadowSplitWeight |
Weighting of the shadow frustum splits between uniform (at 0) and logarithmic (at 1) splits When -1, should be calculated from the scene using the old algorithm. More... | |
QSharedPointer< StelLocation > | location |
Optional more accurate location information, which will override the landscape's position. More... | |
Vec3f | lookAt_fov |
Optional initial look-at vector (azimuth, elevation and FOV in degrees) More... | |
double | eyeLevel |
The height at which the observer's eyes are placed. Default 1.65. More... | |
QString | gridName |
The name of the grid space for displaying the world positon. More... | |
Vec3d | modelWorldOffset |
Offset of the center of the model in a given grid space. More... | |
Vec3d | startWorldOffset |
The world grid space offset where the observer is placed upon loading. More... | |
Vec3d | relativeStartPosition |
Relative start position in model space, calculated from the world offset and start offset with Z rotation, etc. More... | |
bool | altitudeFromModel |
If true, it indicates that the model file's bounding box is used for altitude calculation. More... | |
bool | startPositionFromModel |
If true, it indicates that the model file's bounding box is used for starting position calculation. More... | |
bool | groundNullHeightFromModel |
If true, it indicates that the model file's bounding box is used for starting height calculation. More... | |
Mat4d | obj2gridMatrix |
If only a non-georeferenced OBJ can be provided, you can specify a matrix via .ini/[model]/obj_world_trafo. More... | |
Mat4d | zRotateMatrix |
The vertical axis rotation that must be applied to the scene, for meridian convergence. More... | |
double | groundNullHeight |
The height value outside the ground model's heightmap, or used if no ground model exists. More... | |
float | transparencyThreshold |
Threshold for cutout transparency (no blending). Default is 0.5f. More... | |
bool | sceneryGenerateNormals |
Recalculate normals of the scene from face normals? Default false. More... | |
bool | groundGenerateNormals |
Recalculate normals of the ground from face normals? Default false. More... | |
Static Public Attributes | |
static const QString | SCENES_PATH |
The folder for scenery is found here. More... | |
Contains all the metadata necessary for a Scenery3d scene, and can be loaded from special .ini files in a scene's folder.
Definition at line 37 of file SceneInfo.hpp.
|
static |
Returns all available scene IDs.
|
static |
Returns all available scene names.
|
static |
Returns the ID for the given scene name.
If multiple scenes exist with the same name, the first one found is returned. If no scene is found with this name, an empty string is returned.
QString SceneInfo::getLocalizedHTMLDescription | ( | ) | const |
Tries to find a description.
<language>.utf8 file for this scene, and returns its contents. If no such file exists, the description.en.utf8 is checked. If this is also missing, a null QString is returned. Consider using the value of SceneInfo::description in this case.
|
static |
Builds a mapping of available scene names to the folders they are contained in, similar to the LandscapeMgr's method.
|
inline |
Returns true if the location object is valid.
Definition at line 123 of file SceneInfo.hpp.
|
inline |
Returns true if the lookat_fov is valid.
Definition at line 125 of file SceneInfo.hpp.
|
static |
Loads the scene metadata associated with this ID (directory) into the given object. Returns true on success.
|
static |
Convenience method that finds the ID for the given name and calls loadByID.
bool SceneInfo::altitudeFromModel |
If true, it indicates that the model file's bounding box is used for altitude calculation.
Definition at line 100 of file SceneInfo.hpp.
QString SceneInfo::author |
Author of the scene.
Definition at line 53 of file SceneInfo.hpp.
float SceneInfo::camFarZ |
Distance to cam far clipping plane. Default 10000.0.
Definition at line 76 of file SceneInfo.hpp.
float SceneInfo::camNearZ |
Distance to cam near clipping plane. Default 0.3.
Definition at line 74 of file SceneInfo.hpp.
QString SceneInfo::copyright |
Copyright string.
Definition at line 60 of file SceneInfo.hpp.
QString SceneInfo::description |
A description, which can be displayed in the GUI - supporting HTML tags! Note that this description, as stored in the scenery3d.ini, is only meant as a fallback.
The better way would be to create description.<lang>.utf8 files in the scene's folder. This can then be retrieved using getLocalizedHTMLDescription.
Definition at line 58 of file SceneInfo.hpp.
double SceneInfo::eyeLevel |
The height at which the observer's eyes are placed. Default 1.65.
Definition at line 90 of file SceneInfo.hpp.
QString SceneInfo::fullPath |
The full path to the scene's folder. Other paths (model files) are to be seen relative to this path.
Definition at line 49 of file SceneInfo.hpp.
QString SceneInfo::gridName |
The name of the grid space for displaying the world positon.
Definition at line 92 of file SceneInfo.hpp.
bool SceneInfo::groundGenerateNormals |
Recalculate normals of the ground from face normals? Default false.
Definition at line 120 of file SceneInfo.hpp.
double SceneInfo::groundNullHeight |
The height value outside the ground model's heightmap, or used if no ground model exists.
Definition at line 113 of file SceneInfo.hpp.
bool SceneInfo::groundNullHeightFromModel |
If true, it indicates that the model file's bounding box is used for starting height calculation.
Definition at line 104 of file SceneInfo.hpp.
QString SceneInfo::id |
ID of the scene (relative directory)
Definition at line 47 of file SceneInfo.hpp.
bool SceneInfo::isValid |
If this is a valid sceneInfo object loaded from file.
Definition at line 45 of file SceneInfo.hpp.
QString SceneInfo::landscapeName |
The name of the landscape to switch to. The landscape's position is applied on loading.
Definition at line 62 of file SceneInfo.hpp.
QSharedPointer<StelLocation> SceneInfo::location |
Optional more accurate location information, which will override the landscape's position.
Definition at line 85 of file SceneInfo.hpp.
Vec3f SceneInfo::lookAt_fov |
Optional initial look-at vector (azimuth, elevation and FOV in degrees)
Definition at line 87 of file SceneInfo.hpp.
QString SceneInfo::modelGround |
The file name of the optional seperate ground model (used as a heightmap for walking)
Definition at line 66 of file SceneInfo.hpp.
QString SceneInfo::modelScenery |
The file name of the scenery .obj model.
Definition at line 64 of file SceneInfo.hpp.
Vec3d SceneInfo::modelWorldOffset |
Offset of the center of the model in a given grid space.
Definition at line 94 of file SceneInfo.hpp.
QString SceneInfo::name |
Name of the scene.
Definition at line 51 of file SceneInfo.hpp.
Mat4d SceneInfo::obj2gridMatrix |
If only a non-georeferenced OBJ can be provided, you can specify a matrix via .ini/[model]/obj_world_trafo.
This will be applied to make sure that X=Grid-East, Y=Grid-North, Z=height.
Definition at line 108 of file SceneInfo.hpp.
Vec3d SceneInfo::relativeStartPosition |
Relative start position in model space, calculated from the world offset and start offset with Z rotation, etc.
Definition at line 98 of file SceneInfo.hpp.
bool SceneInfo::sceneryGenerateNormals |
Recalculate normals of the scene from face normals? Default false.
Definition at line 118 of file SceneInfo.hpp.
|
static |
The folder for scenery is found here.
Definition at line 133 of file SceneInfo.hpp.
float SceneInfo::shadowFarZ |
An optional shadow far clipping plane, constraining the shadowmaps to a smaller region than is visible.
Must be smaller or equal to camFarZ. Default equals camFarZ.
Definition at line 79 of file SceneInfo.hpp.
float SceneInfo::shadowSplitWeight |
Weighting of the shadow frustum splits between uniform (at 0) and logarithmic (at 1) splits When -1, should be calculated from the scene using the old algorithm.
Definition at line 82 of file SceneInfo.hpp.
bool SceneInfo::startPositionFromModel |
If true, it indicates that the model file's bounding box is used for starting position calculation.
Definition at line 102 of file SceneInfo.hpp.
Vec3d SceneInfo::startWorldOffset |
The world grid space offset where the observer is placed upon loading.
Definition at line 96 of file SceneInfo.hpp.
float SceneInfo::transparencyThreshold |
Threshold for cutout transparency (no blending). Default is 0.5f.
Definition at line 116 of file SceneInfo.hpp.
QString SceneInfo::vertexOrder |
Optional string depicting vertex order of models (XYZ, ZXY, ...)
Definition at line 68 of file SceneInfo.hpp.
StelOBJ::VertexOrder SceneInfo::vertexOrderEnum |
The vertex order of the corresponding OBJ file.
Definition at line 71 of file SceneInfo.hpp.
Mat4d SceneInfo::zRotateMatrix |
The vertical axis rotation that must be applied to the scene, for meridian convergence.
This is calculated from other fields in the file.
Definition at line 111 of file SceneInfo.hpp.