Landscape.hpp   Landscape.hpp 
skipping to change at line 44 skipping to change at line 44
class StelLocation; class StelLocation;
class StelCore; class StelCore;
class StelPainter; class StelPainter;
//! @class Landscape //! @class Landscape
//! Store and manages the displaying of the Landscape. //! Store and manages the displaying of the Landscape.
//! Don't use this class direcly, use the LandscapeMgr. //! Don't use this class direcly, use the LandscapeMgr.
class Landscape class Landscape
{ {
public: public:
Landscape(float _radius = 2.); Landscape(float _radius = 2.f);
virtual ~Landscape(); virtual ~Landscape();
virtual void load(const QSettings& landscapeIni, const QString& land scapeId) = 0; virtual void load(const QSettings& landscapeIni, const QString& land scapeId) = 0;
virtual void draw(StelCore* core) = 0; virtual void draw(StelCore* core) = 0;
void update(double deltaTime) void update(double deltaTime)
{ {
landFader.update((int)(deltaTime*1000)); landFader.update((int)(deltaTime*1000));
fogFader.update((int)(deltaTime*1000)); fogFader.update((int)(deltaTime*1000));
} }
//! Set the brightness of the landscape //! Set the brightness of the landscape
skipping to change at line 76 skipping to change at line 76
QString getName() const {return name;} QString getName() const {return name;}
//! Get landscape author name //! Get landscape author name
QString getAuthorName() const {return author;} QString getAuthorName() const {return author;}
//! Get landscape description //! Get landscape description
QString getDescription() const {return description;} QString getDescription() const {return description;}
//! Return the associated location or NULL //! Return the associated location or NULL
const StelLocation& getLocation() const {return location;} const StelLocation& getLocation() const {return location;}
//! Set the z-axis rotation (offset from original value when rotated //! Set the z-axis rotation (offset from original value when rotated
void setZRotation(double d) {angleRotateZOffset = d;} void setZRotation(float d) {angleRotateZOffset = d;}
protected: protected:
//! Load attributes common to all landscapes //! Load attributes common to all landscapes
//! @param landscapeIni A reference to an existant QSettings object which describes the landscape //! @param landscapeIni A reference to an existant QSettings object which describes the landscape
//! @param landscapeId The name of the directory for the landscape f iles (e.g. "ocean") //! @param landscapeId The name of the directory for the landscape f iles (e.g. "ocean")
void loadCommon(const QSettings& landscapeIni, const QString& landsc apeId); void loadCommon(const QSettings& landscapeIni, const QString& landsc apeId);
//! search for a texture in landscape directory, else global texture s directory //! search for a texture in landscape directory, else global texture s directory
//! @param basename The name of a texture file, e.g. "fog.png" //! @param basename The name of a texture file, e.g. "fog.png"
//! @param landscapeId The landscape ID (directory name) to which th e texture belongs //! @param landscapeId The landscape ID (directory name) to which th e texture belongs
//! @exception misc possibility of throwing "file not found" excepti ons //! @exception misc possibility of throwing "file not found" excepti ons
const QString getTexturePath(const QString& basename, const QString& landscapeId); const QString getTexturePath(const QString& basename, const QString& landscapeId);
float radius; float radius;
QString name; QString name;
float skyBrightness; float skyBrightness;
bool validLandscape; // was a landscape loaded properly? bool validLandscape; // was a landscape loaded properly?
LinearFader landFader; LinearFader landFader;
LinearFader fogFader; LinearFader fogFader;
QString author; QString author;
QString description; QString description;
// GZ patched, these can now be set in landscape.ini:
int rows; // horizontal rows
int cols; // vertical columns
typedef struct typedef struct
{ {
StelTextureSP tex; StelTextureSP tex;
float texCoords[4]; float texCoords[4];
} landscapeTexCoord; } landscapeTexCoord;
StelLocation location; StelLocation location;
float angleRotateZ; float angleRotateZ;
float angleRotateZOffset; float angleRotateZOffset;
}; };
class LandscapeOldStyle : public Landscape class LandscapeOldStyle : public Landscape
{ {
public: public:
LandscapeOldStyle(float _radius = 2.); LandscapeOldStyle(float radius = 2.f);
virtual ~LandscapeOldStyle(); virtual ~LandscapeOldStyle();
virtual void load(const QSettings& landscapeIni, const QString& land scapeId); virtual void load(const QSettings& landscapeIni, const QString& land scapeId);
virtual void draw(StelCore* core); virtual void draw(StelCore* core);
void create(bool _fullpath, QMap<QString, QString> param); void create(bool _fullpath, QMap<QString, QString> param);
private: private:
void drawFog(StelCore* core, StelPainter&) const; void drawFog(StelCore* core, StelPainter&) const;
void drawDecor(StelCore* core, StelPainter&) const; void drawDecor(StelCore* core, StelPainter&) const;
void drawGround(StelCore* core, StelPainter&) const; void drawGround(StelCore* core, StelPainter&) const;
QVector<double> groundVertexArr;
QVector<float> groundTexCoordArr;
StelTextureSP* sideTexs; StelTextureSP* sideTexs;
int nbSideTexs; int nbSideTexs;
int nbSide; int nbSide;
landscapeTexCoord* sides; landscapeTexCoord* sides;
StelTextureSP fogTex; StelTextureSP fogTex;
landscapeTexCoord fogTexCoord; landscapeTexCoord fogTexCoord;
StelTextureSP groundTex; StelTextureSP groundTex;
landscapeTexCoord groundTexCoord; landscapeTexCoord groundTexCoord;
int nbDecorRepeat; int nbDecorRepeat;
float fogAltAngle; float fogAltAngle;
float fogAngleShift; float fogAngleShift;
float decorAltAngle; float decorAltAngle;
float decorAngleShift; float decorAngleShift;
float groundAngleShift; float groundAngleShift;
float groundAngleRotateZ; float groundAngleRotateZ;
int drawGroundFirst; int drawGroundFirst;
bool tanMode; // Whether the angles should be converted using tan bool tanMode; // Whether the angles should be converted us
instead of sin ing tan instead of sin
bool calibrated; // if true, the documented altitudes are ind
ed correct (the original code is buggy!)
struct LOSSide
{
StelVertexArray arr;
StelTextureSP tex;
};
QList<LOSSide> precomputedSides;
}; };
class LandscapeFisheye : public Landscape class LandscapeFisheye : public Landscape
{ {
public: public:
LandscapeFisheye(float _radius = 1.); LandscapeFisheye(float radius = 1.f);
virtual ~LandscapeFisheye(); virtual ~LandscapeFisheye();
virtual void load(const QSettings& landscapeIni, const QString& land scapeId); virtual void load(const QSettings& landscapeIni, const QString& land scapeId);
virtual void draw(StelCore* core); virtual void draw(StelCore* core);
void create(const QString _name, bool _fullpath, const QString& _map void create(const QString name, const QString& maptex, float texture
tex, fov, float angleRotateZ);
double _texturefov, double angleRotateZ);
private: private:
StelTextureSP mapTex; StelTextureSP mapTex;
float texFov; float texFov;
}; };
class LandscapeSpherical : public Landscape class LandscapeSpherical : public Landscape
{ {
public: public:
LandscapeSpherical(float _radius = 1.); LandscapeSpherical(float radius = 1.f);
virtual ~LandscapeSpherical(); virtual ~LandscapeSpherical();
virtual void load(const QSettings& landscapeIni, const QString& land scapeId); virtual void load(const QSettings& landscapeIni, const QString& land scapeId);
virtual void draw(StelCore* core); virtual void draw(StelCore* core);
void create(const QString _name, bool _fullpath, void create(const QString name, const QString& maptex, float angleRo
const QString& _maptex, double angleRotateZ) tateZ);
;
private: private:
StelTextureSP mapTex; StelTextureSP mapTex;
}; };
#endif // _LANDSCAPE_HPP_ #endif // _LANDSCAPE_HPP_
 End of changes. 10 change blocks. 
13 lines changed or deleted 25 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/