SceneInfo.hpp   SceneInfo.hpp 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _SCENEINFO_HPP_ #ifndef _SCENEINFO_HPP_
#define _SCENEINFO_HPP_ #define _SCENEINFO_HPP_
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
#include "StelOBJ.hpp"
#include <QMap> #include <QMap>
#include <QSharedPointer> #include <QSharedPointer>
Q_DECLARE_LOGGING_CATEGORY(sceneInfo)
class QSettings; class QSettings;
//! Contains all the metadata necessary for a Scenery3d scene, //! Contains all the metadata necessary for a Scenery3d scene,
//! and can be loaded from special .ini files in a scene's folder. //! and can be loaded from special .ini files in a scene's folder.
struct SceneInfo struct SceneInfo
{ {
SceneInfo() : isValid(false),id(),fullPath(),name(),author(),descrip tion(),copyright(),landscapeName(),modelScenery(),modelGround(),vertexOrder (), SceneInfo() : isValid(false),id(),fullPath(),name(),author(),descrip tion(),copyright(),landscapeName(),modelScenery(),modelGround(),vertexOrder (),vertexOrderEnum(StelOBJ::XYZ),
camNearZ(0.1f),camFarZ(1000.0f),shadowFarZ(1000.0f),shadowSp litWeight(0.5f),location(),lookAt_fov(0.0f,0.0f,25.0f),eyeLevel(0.0), camNearZ(0.1f),camFarZ(1000.0f),shadowFarZ(1000.0f),shadowSp litWeight(0.5f),location(),lookAt_fov(0.0f,0.0f,25.0f),eyeLevel(0.0),
altitudeFromModel(false),startPositionFromModel(false),groun dNullHeightFromModel(false),groundNullHeight(0.0), altitudeFromModel(false),startPositionFromModel(false),groun dNullHeightFromModel(false),groundNullHeight(0.0),
transparencyThreshold(0.0f),sceneryGenerateNormals(false),gr oundGenerateNormals(false) transparencyThreshold(0.0f),sceneryGenerateNormals(false),gr oundGenerateNormals(false)
{} {}
//! If this is a valid sceneInfo object loaded from file //! If this is a valid sceneInfo object loaded from file
bool isValid; bool isValid;
//! ID of the scene (relative directory) //! ID of the scene (relative directory)
QString id; QString id;
//! The full path to the scene's folder. Other paths (model files) a re to be seen relative to this path. //! The full path to the scene's folder. Other paths (model files) a re to be seen relative to this path.
QString fullPath; QString fullPath;
skipping to change at line 67 skipping to change at line 70
QString copyright; QString copyright;
//! The name of the landscape to switch to. The landscape's position is applied on loading. //! The name of the landscape to switch to. The landscape's position is applied on loading.
QString landscapeName; QString landscapeName;
//! The file name of the scenery .obj model //! The file name of the scenery .obj model
QString modelScenery; QString modelScenery;
//! The file name of the optional seperate ground model (used as a h eightmap for walking) //! The file name of the optional seperate ground model (used as a h eightmap for walking)
QString modelGround; QString modelGround;
//! Optional string depicting vertex order of models (XYZ, ZXY, ...) //! Optional string depicting vertex order of models (XYZ, ZXY, ...)
QString vertexOrder; QString vertexOrder;
//! The vertex order of the corresponding OBJ file
StelOBJ::VertexOrder vertexOrderEnum;
//! Distance to cam near clipping plane. Default 0.3. //! Distance to cam near clipping plane. Default 0.3.
float camNearZ; float camNearZ;
//! Distance to cam far clipping plane. Default 10000.0 //! Distance to cam far clipping plane. Default 10000.0
float camFarZ; float camFarZ;
//! An optional shadow far clipping plane, constraining the shadowma ps to a smaller region than is visible. //! An optional shadow far clipping plane, constraining the shadowma ps to a smaller region than is visible.
//! Must be smaller or equal to camFarZ. Default equals camFarZ. //! Must be smaller or equal to camFarZ. Default equals camFarZ.
float shadowFarZ; float shadowFarZ;
//! Weighting of the shadow frustum splits between uniform (at 0) an d logarithmic (at 1) splits //! Weighting of the shadow frustum splits between uniform (at 0) an d logarithmic (at 1) splits
//! When -1, should be calculated from the scene using the old algor ithm //! When -1, should be calculated from the scene using the old algor ithm
float shadowSplitWeight; float shadowSplitWeight;
skipping to change at line 139 skipping to change at line 145
static bool loadByID(const QString& id, SceneInfo &info); static bool loadByID(const QString& id, SceneInfo &info);
//! Convenience method that finds the ID for the given name and call s loadByID. //! Convenience method that finds the ID for the given name and call s loadByID.
static bool loadByName(const QString& name, SceneInfo& info); static bool loadByName(const QString& name, SceneInfo& info);
//! Returns the ID for the given scene name. //! 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 retur ned. //! 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 retur ned.
static QString getIDFromName(const QString& name); static QString getIDFromName(const QString& name);
//! Returns all available scene IDs //! Returns all available scene IDs
static QStringList getAllSceneIDs(); static QStringList getAllSceneIDs();
//! Returns all available scene names //! Returns all available scene names
static QStringList getAllSceneNames(); static QStringList getAllSceneNames();
//! Builds a mapping of available scene names to the folders they ar
e contained in, similar to the LandscapeMgr's method
static QMap<QString,QString> getNameToIDMap();
private:
//! The meta type ID associated to the SceneInfo type //! The meta type ID associated to the SceneInfo type
static int metaTypeId; static int metaTypeId;
private:
//! Builds a mapping of available scene names to the folders they ar
e contained in, similar to the LandscapeMgr's method
static QMap<QString,QString> getNameToIDMap();
static int initMetaType();
}; };
Q_DECLARE_LOGGING_CATEGORY(storedView)
struct StoredView; struct StoredView;
typedef QList<StoredView> StoredViewList; typedef QList<StoredView> StoredViewList;
//! A structure which stores a specific view position, view direction and F OV, together with a textual description. //! A structure which stores a specific view position, view direction and F OV, together with a textual description.
struct StoredView struct StoredView
{ {
StoredView() : position(0,0,0,0), view_fov(0,0,-1000), isGlobal(fals e), jd(0.0), jdIsRelevant(false) StoredView() : position(0,0,0,0), view_fov(0,0,-1000), isGlobal(fals e), jd(0.0), jdIsRelevant(false)
{} {}
//! A descriptive label //! A descriptive label
 End of changes. 8 change blocks. 
6 lines changed or deleted 12 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/