21 #ifndef _SCENEINFO_HPP_ 22 #define _SCENEINFO_HPP_ 24 #include "StelLocation.hpp" 25 #include "VecMath.hpp" 26 #include "StelOBJ.hpp" 29 #include <QSharedPointer> 31 Q_DECLARE_LOGGING_CATEGORY(sceneInfo)
39 SceneInfo() : isValid(
false),id(),fullPath(),name(),author(),description(),copyright(),landscapeName(),modelScenery(),modelGround(),vertexOrder(),vertexOrderEnum(StelOBJ::XYZ),
40 camNearZ(0.1f),camFarZ(1000.0f),shadowFarZ(1000.0f),shadowSplitWeight(0.5f),location(),lookAt_fov(0.0f,0.0f,25.0f),eyeLevel(0.0),
41 altitudeFromModel(
false),startPositionFromModel(
false),groundNullHeightFromModel(
false),groundNullHeight(0.0),
42 transparencyThreshold(0.0f),sceneryGenerateNormals(
false),groundGenerateNormals(
false)
130 QString getLocalizedHTMLDescription()
const;
135 static bool loadByID(
const QString&
id, SceneInfo &info);
137 static bool loadByName(
const QString& name, SceneInfo& info);
140 static QString getIDFromName(
const QString& name);
142 static QStringList getAllSceneIDs();
144 static QStringList getAllSceneNames();
146 static QMap<QString,QString> getNameToIDMap();
150 static int metaTypeId;
153 Q_DECLARE_LOGGING_CATEGORY(storedView)
155 typedef QList<StoredView> StoredViewList;
160 StoredView() : position(0,0,0,0), view_fov(0,0,-1000), isGlobal(
false), jd(0.0), jdIsRelevant(
false)
180 static StoredViewList getGlobalViewsForScene(
const SceneInfo& scene);
183 static StoredViewList getUserViewsForScene(
const SceneInfo& scene);
186 static void saveUserViews(
const SceneInfo& scene,
const StoredViewList& list);
188 static QSettings* userviews;
189 static const QString USERVIEWS_FILE;
191 static void readArray(QSettings& ini,StoredViewList& list,
int size,
bool isGlobal);
192 static void writeArray(QSettings& ini,
const StoredViewList& list);
193 static QSettings* getUserViews();
bool groundGenerateNormals
Recalculate normals of the ground from face normals? Default false.
QString author
Author of the scene.
QString modelScenery
The file name of the scenery .obj model.
Vec3d modelWorldOffset
Offset of the center of the model in a given grid space.
bool isValid
If this is a valid sceneInfo object loaded from file.
Vec4d position
Stored grid position + current eye height in 4th component.
bool hasLocation() const
Returns true if the location object is valid.
float shadowFarZ
An optional shadow far clipping plane, constraining the shadowmaps to a smaller region than is visibl...
double eyeLevel
The height at which the observer's eyes are placed. Default 1.65.
Contains all the metadata necessary for a Scenery3d scene, and can be loaded from special ...
float camFarZ
Distance to cam far clipping plane. Default 10000.0.
bool altitudeFromModel
If true, it indicates that the model file's bounding box is used for altitude calculation.
Mat4d zRotateMatrix
The vertical axis rotation that must be applied to the scene, for meridian convergence.
StelOBJ::VertexOrder vertexOrderEnum
The vertex order of the corresponding OBJ file.
static const QString SCENES_PATH
The folder for scenery is found here.
double jd
Julian Date of interest.
QString name
Name of the scene.
bool groundNullHeightFromModel
If true, it indicates that the model file's bounding box is used for starting height calculation...
QString label
A descriptive label.
QString description
A description of the view.
QString description
A description, which can be displayed in the GUI - supporting HTML tags! Note that this description...
Mat4d obj2gridMatrix
If only a non-georeferenced OBJ can be provided, you can specify a matrix via .ini/[model]/obj_world_...
Vec3d relativeStartPosition
Relative start position in model space, calculated from the world offset and start offset with Z rota...
Vec3f view_fov
Alt/Az angles in degrees + field of view.
bool jdIsRelevant
Indicate if stored date is potentially relevant.
QSharedPointer< StelLocation > location
Optional more accurate location information, which will override the landscape's position.
bool startPositionFromModel
If true, it indicates that the model file's bounding box is used for starting position calculation...
QString fullPath
The full path to the scene's folder. Other paths (model files) are to be seen relative to this path...
Vec3d startWorldOffset
The world grid space offset where the observer is placed upon loading.
QString copyright
Copyright string.
Vec3f lookAt_fov
Optional initial look-at vector (azimuth, elevation and FOV in degrees)
double groundNullHeight
The height value outside the ground model's heightmap, or used if no ground model exists...
bool isGlobal
True if this is a position stored next to the scene definition (viewpoints.ini). If false...
QString modelGround
The file name of the optional seperate ground model (used as a heightmap for walking) ...
float transparencyThreshold
Threshold for cutout transparency (no blending). Default is 0.5f.
float shadowSplitWeight
Weighting of the shadow frustum splits between uniform (at 0) and logarithmic (at 1) splits When -1...
QString landscapeName
The name of the landscape to switch to. The landscape's position is applied on loading.
float camNearZ
Distance to cam near clipping plane. Default 0.3.
bool hasLookAtFOV() const
Returns true if the lookat_fov is valid.
QString vertexOrder
Optional string depicting vertex order of models (XYZ, ZXY, ...)
A structure which stores a specific view position, view direction and FOV, together with a textual de...
QString id
ID of the scene (relative directory)
bool sceneryGenerateNormals
Recalculate normals of the scene from face normals? Default false.
QString gridName
The name of the grid space for displaying the world positon.
VertexOrder
Possible vertex orderings with load()