Landscape.hpp   Landscape.hpp 
skipping to change at line 159 skipping to change at line 159
//! 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; const QString getTexturePath(const QString& basename, const QString& landscapeId) const;
float radius; float radius;
QString name; //! Read from landscape.ini:[landscape]name QString name; //! Read from landscape.ini:[landscape]name
QString author; //! Read from landscape.ini:[landscape]author QString author; //! Read from landscape.ini:[landscape]author
QString description; //! Read from landscape.ini:[landscape]descri ption QString description; //! Read from landscape.ini:[landscape]descri ption
//float nightBrightness;
float minBrightness; //! Read from landscape.ini:[landscape]minima l_brightness. Allows minimum visibility that cannot be underpowered. float minBrightness; //! Read from landscape.ini:[landscape]minima l_brightness. Allows minimum visibility that cannot be underpowered.
float landscapeBrightness; //! brightness [0..1] to draw the landsc ape. Computed by the LandscapeMgr. float landscapeBrightness; //! brightness [0..1] to draw the landsc ape. Computed by the LandscapeMgr.
float lightScapeBrightness; //! can be used to draw nightscape textu re (e.g. city light pollution), if available. Computed by the LandscapeMgr. float lightScapeBrightness; //! can be used to draw nightscape textu re (e.g. city light pollution), if available. Computed by the LandscapeMgr.
bool validLandscape; //! was a landscape loaded properly? bool validLandscape; //! was a landscape loaded properly?
LinearFader landFader; //! Used to slowly fade in/out landscape pain ting. LinearFader landFader; //! Used to slowly fade in/out landscape pain ting.
LinearFader fogFader; //! Used to slowly fade in/out fog painting. LinearFader fogFader; //! Used to slowly fade in/out fog painting.
int rows; //! horizontal rows. May be given in landscape.ini:[lands cape]tesselate_rows. More indicates higher accuracy, but is slower. int rows; //! horizontal rows. May be given in landscape.ini:[lands cape]tesselate_rows. More indicates higher accuracy, but is slower.
int cols; //! vertical columns. May be given in landscape.ini:[lands cape]tesselate_cols. More indicates higher accuracy, but is slower. int cols; //! vertical columns. May be given in landscape.ini:[lands cape]tesselate_cols. More indicates higher accuracy, but is slower.
float angleRotateZ; //! [radians] if pano does not have its left border in the east, rotate in azimuth. Configured in landscape.ini[landscap e]angle_rotatez (or decor_angle_rotatez for old_style landscapes) float angleRotateZ; //! [radians] if pano does not have its left border in the east, rotate in azimuth. Configured in landscape.ini[landscap e]angle_rotatez (or decor_angle_rotatez for old_style landscapes)
float angleRotateZOffset; //! [radians] This is a rotation changeabl e at runtime via setZRotation (called by LandscapeMgr::setZRotation). float angleRotateZOffset; //! [radians] This is a rotation changeabl e at runtime via setZRotation (called by LandscapeMgr::setZRotation).
skipping to change at line 200 skipping to change at line 200
//! and closes the ground with a separate bottom piece. (You may want to co nfigure a map with pointers to surrounding mountains or a compass rose inst ead!) //! and closes the ground with a separate bottom piece. (You may want to co nfigure a map with pointers to surrounding mountains or a compass rose inst ead!)
//! You can use panoramas created in equirectangular or cylindrical coordin ates, for the latter case set //! You can use panoramas created in equirectangular or cylindrical coordin ates, for the latter case set
//! [landscape]tan_mode=true. //! [landscape]tan_mode=true.
//! Until V0.10.5 there was an undetected bug involving vertical positionin g. For historical reasons (many landscapes //! Until V0.10.5 there was an undetected bug involving vertical positionin g. For historical reasons (many landscapes
//! were already configured and published), it was decided to keep this bug as feature, but a fix for new landscapes is //! were already configured and published), it was decided to keep this bug as feature, but a fix for new landscapes is
//! available: [landscape]calibrated=true. //! available: [landscape]calibrated=true.
//! As of 0.10.6, the fix is only valid for equirectangular panoramas. //! As of 0.10.6, the fix is only valid for equirectangular panoramas.
//! As of V0.13, [landscape]calibrated=true and [landscape]tan_mode=true go together for cylindrical panoramas. //! As of V0.13, [landscape]calibrated=true and [landscape]tan_mode=true go together for cylindrical panoramas.
//! It is more involved to configure, but may still be preferred if you req uire the resolution, e.g. for alignment studies //! It is more involved to configure, but may still be preferred if you req uire the resolution, e.g. for alignment studies
//! for archaeoastronomy. In this case, don't forget to set calibrated=true in landscape.ini. //! for archaeoastronomy. In this case, don't forget to set calibrated=true in landscape.ini.
//! Since V0.13.1, also this landscape has a self-luminous (light pollution
) option: Configure light<n> entries with textures overlaid the tex<n> text
ures. Only textures with light are necessary!
//! Can be easily made using layers with e.g. Photoshop or Gimp.
class LandscapeOldStyle : public Landscape class LandscapeOldStyle : public Landscape
{ {
public: public:
LandscapeOldStyle(float radius = 2.f); 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); // stil l not implemented //void create(bool _fullpath, QMap<QString, QString> param); // stil l not implemented
virtual float getOpacity(Vec3d azalt) const; virtual float getOpacity(Vec3d azalt) const;
protected: protected:
typedef struct typedef struct
{ {
StelTextureSP tex; StelTextureSP tex;
StelTextureSP tex_illum; // optional light texture.
float texCoords[4]; float texCoords[4];
} landscapeTexCoord; } landscapeTexCoord;
private: private:
void drawFog(StelCore* core, StelPainter&) const; void drawFog(StelCore* core, StelPainter&) const;
void drawDecor(StelCore* core, StelPainter&) const; // GZ NEW: drawLight selects only the self-illuminating panels.
void drawDecor(StelCore* core, StelPainter&, const bool drawLight=fa
lse) const;
void drawGround(StelCore* core, StelPainter&) const; void drawGround(StelCore* core, StelPainter&) const;
QVector<double> groundVertexArr; QVector<double> groundVertexArr;
QVector<float> groundTexCoordArr; 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; // GZ: UNUSED! //landscapeTexCoord fogTexCoord; // GZ: UNUSED!
StelTextureSP groundTex; StelTextureSP groundTex;
skipping to change at line 245 skipping to change at line 249
float decorAngleShift; float decorAngleShift;
float groundAngleShift; //! [radians]: altitude of the bottom plane. Usually negative and equal to decorAngleShift float groundAngleShift; //! [radians]: altitude of the bottom plane. Usually negative and equal to decorAngleShift
float groundAngleRotateZ; //! [radians] float groundAngleRotateZ; //! [radians]
int drawGroundFirst; int drawGroundFirst;
bool tanMode; // Whether the angles should be converted us ing tan instead of sin, i.e., for a cylindrical pano bool tanMode; // Whether the angles should be converted us ing tan instead of sin, i.e., for a cylindrical pano
bool calibrated; // if true, the documented altitudes are ind eed correct (the original code is buggy!) bool calibrated; // if true, the documented altitudes are ind eed correct (the original code is buggy!)
struct LOSSide struct LOSSide
{ {
StelVertexArray arr; StelVertexArray arr;
StelTextureSP tex; StelTextureSP tex;
bool light; // GZ NEW: true if texture is self-lighting.
}; };
QList<LOSSide> precomputedSides; QList<LOSSide> precomputedSides;
}; };
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
/// ///
//! @class LandscapePolygonal //! @class LandscapePolygonal
//! This uses the list of (usually measured) horizon altitudes to define th e horizon. //! This uses the list of (usually measured) horizon altitudes to define th e horizon.
//! Define it with the following names in landscape.ini: //! Define it with the following names in landscape.ini:
 End of changes. 5 change blocks. 
2 lines changed or deleted 10 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/