20 #ifndef _LANDSCAPE_HPP_
21 #define _LANDSCAPE_HPP_
23 #include "VecMath.hpp"
24 #include "StelToneReproducer.hpp"
25 #include "StelProjector.hpp"
27 #include "StelFader.hpp"
28 #include "StelUtils.hpp"
30 #include "StelLocation.hpp"
68 virtual void load(
const QSettings& landscapeIni,
const QString& landscapeId) = 0;
69 virtual void draw(
StelCore* core) = 0;
70 void update(
double deltaTime)
73 fogFader.update((
int)(deltaTime*1000));
159 void loadCommon(
const QSettings& landscapeIni,
const QString& landscapeId);
164 void createPolygonalHorizon(
const QString& lineFileName,
const float polyAngleRotateZ=0.0f,
const QString &listMode=
"azDeg_altDeg");
170 const QString
getTexturePath(
const QString& basename,
const QString& landscapeId)
const;
224 virtual void load(
const QSettings& landscapeIni,
const QString& landscapeId);
241 QVector<double> groundVertexArr;
242 QVector<float> groundTexCoordArr;
249 QVector<QImage*> sidesImages;
254 float decorAngleShift;
255 float groundAngleShift;
256 float groundAngleRotateZ;
267 QList<LOSSide> precomputedSides;
284 virtual void load(
const QSettings& landscapeIni,
const QString& landscapeId);
303 virtual void load(
const QSettings& landscapeIni,
const QString& landscapeId);
314 void create(
const QString name,
const QString& maptex,
float texturefov,
float angleRotateZ);
315 void create(
const QString name,
float texturefov,
const QString& maptex,
const QString &_maptexFog=
"",
const QString& _maptexIllum=
"",
const float angleRotateZ=0.0f);
343 virtual void load(
const QSettings& landscapeIni,
const QString& landscapeId);
360 void create(
const QString name,
const QString& maptex,
const QString &_maptexFog=
"",
const QString& _maptexIllum=
"",
const float _angleRotateZ=0.0f,
361 const float _mapTexTop=90.0f,
const float _mapTexBottom=-90.0f,
362 const float _fogTexTop=90.0f,
const float _fogTexBottom=-90.0f,
363 const float _illumTexTop=90.0f,
const float _illumTexBottom=-90.0f);
378 float illumTexBottom;
382 #endif // _LANDSCAPE_HPP_
float getDefaultAtmosphericExtinction() const
Return default atmosperic extinction [mag/airmass], or -1 (no change)
int rows
Used to slowly fade in/out illumination painting.
bool getFlagShow() const
Get whether landscape is displayed (does not concern fog)
Store the informations for a location on a planet.
virtual float getOpacity(Vec3d azalt) const
Sample landscape texture for transparency/opacity.
int defaultBortleIndex
OPTIONAL. If present, can be used to set location.
float minBrightness
Read from landscape.ini:[landscape]description.
Store and manages the displaying of the Landscape.
int defaultFogSetting
May be given in landscape.ini:[location]light_pollution. Default: -1 (no change). ...
Implementation of StelFader which implements a linear transition.
int getDefaultBortleIndex() const
Return default Bortle index (light pollution value) or -1 (unknown/no change)
virtual void load(const QSettings &landscapeIni, const QString &landscapeId)
Load landscape.
virtual float getOpacity(Vec3d azalt) const
can be used to find sunrise or visibility questions on the real-world landscape horizon.
float defaultExtinctionCoefficient
May be given in landscape.ini:[location]display_fog: -1(no change), 0(off), 1(on). Default: -1.
QString description
Read from landscape.ini:[landscape]author.
A shared pointer on a SphericalRegion.
Define the StelTextureSP type.
float getLightscapeBrightness() const
Returns the lightscape brightness.
void setFlagShow(const bool b)
Set whether landscape is displayed (does not concern fog)
This was the original landscape, introduced for decorative purposes.
This uses a single image in fisheye projection.
int cols
horizontal rows. May be given in landscape.ini:[landscape]tesselate_rows. More indicates higher accur...
float getTargetLightscapeBrightness() const
Returns the lightscape brighness modulated with the fader's target state (i.e. binary on/off) ...
QString author
Read from landscape.ini:[landscape]name.
virtual void load(const QSettings &landscapeIni, const QString &landscapeId)
Load landscape.
azimuth[degrees] altitude[degrees]
Main class for Stellarium core processing.
void create(const QString name, const QString &maptex, float texturefov, float angleRotateZ)
create a fisheye landscape from basic parameters (no ini file needed).
void loadCommon(const QSettings &landscapeIni, const QString &landscapeId)
Load attributes common to all landscapes.
Vec3f horizonPolygonLineColor
Optional element describing the horizon line.
void create(const QString name, const QString &maptex, const QString &_maptexFog="", const QString &_maptexIllum="", const float _angleRotateZ=0.0f, const float _mapTexTop=90.0f, const float _mapTexBottom=-90.0f, const float _fogTexTop=90.0f, const float _fogTexBottom=-90.0f, const float _illumTexTop=90.0f, const float _illumTexBottom=-90.0f)
create a spherical landscape from basic parameters (no ini file needed).
azimuth[radians] altitude[radians]
QString getDescription() const
Get landscape description.
float defaultTemperature
May be given in landscape.ini:[location]atmospheric_extinction_coefficient. Default -1 (no change)...
LinearFader fogFader
Used to slowly fade in/out landscape painting.
float getDefaultAtmosphericTemperature() const
Return configured atmospheric temperature [degrees Celsius], for refraction computation, or -1000 for "unknown/no change".
float landscapeBrightness
Read from landscape.ini:[landscape]minimal_brightness. Allows minimum visibility that cannot be under...
float getBrightness() const
Returns the current brightness level.
bool hasLocation() const
Return if the location is valid (a valid location has a valid planetName!)
QString planetName
English planet name.
bool getIsFullyVisible() const
Get whether the landscape is currently fully visible (i.e. opaque).
float getEffectiveLightscapeBrightness() const
Gets the currently effective lightscape brightness (modulated by the fader)
bool getFlagShowIllumination() const
Get whether illumination is displayed.
float lightScapeBrightness
brightness [0..1] to draw the landscape. Computed by the LandscapeMgr.
This uses a single panorama image in spherical (equirectangular) projection.
Provides functions for performing openGL drawing operations.
virtual float getOpacity(Vec3d azalt) const
can be used to find sunrise or visibility questions on the real-world landscape horizon.
virtual void load(const QSettings &landscapeIni, const QString &landscapeId)=0
Load landscape.
float getLandscapeMinimalBrightness() const
Return minimal brightness for landscape returns -1 to signal "standard conditions" (use default value...
float angleRotateZOffset
[radians] if pano does not have its left border in the east, rotate in azimuth. Configured in landsca...
QString getName() const
Get landscape name.
LinearFader landFader
was a landscape loaded properly?
int getDefaultFogSetting() const
Return default fog setting (0/1) or -1 (no change)
LinearFader illumFader
Used to slowly fade in/out fog painting.
virtual void load(const QSettings &landscapeIni, const QString &landscapeId)
Load landscape.
SphericalRegionP horizonPolygon
[mbar] May be given in landscape.ini:[location]atmospheric_pressure. Default -1.0 (compute from [loca...
azimuth[degrees] zenithDistance[degrees]
This uses the list of (usually measured) horizon altitudes to define the horizon. ...
azimuth[new_degrees] altitude[new_degrees] (may be found on theodolites)
float defaultPressure
[Celsius] May be given in landscape.ini:[location]atmospheric_temperature. default: -1000...
virtual void load(const QSettings &landscapeIni, const QString &landscapeId)
Load landscape.
virtual float getOpacity(Vec3d azalt) const
Sample landscape texture for transparency/opacity.
azimuth[radians] zenithDistance[radians]
virtual float getOpacity(Vec3d azalt) const
can be used to find sunrise or visibility questions on the real-world landscape horizon.
bool getFlagShowFog() const
Get whether fog is displayed.
void setFlagShowFog(const bool b)
Set whether fog is displayed.
const QString getTexturePath(const QString &basename, const QString &landscapeId) const
search for a texture in landscape directory, else global textures directory
void setFlagShowIllumination(const bool b)
Set whether illumination is displayed.
void setZRotation(float d)
Set an additional z-axis (azimuth) rotation after landscape has been loaded.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
float getDefaultAtmosphericPressure() const
Return configured atmospheric pressure [mbar], for refraction computation.
void setBrightness(const float b, const float pollutionBrightness=0.0f)
Set the brightness of the landscape plus brightness of optional add-on night lightscape.
const StelLocation & getLocation() const
Return the associated location (may be empty!)
StelLocation location
[radians] This is a rotation changeable at runtime via setZRotation (called by LandscapeMgr::setZRota...
bool validLandscape
can be used to draw nightscape texture (e.g. city light pollution), if available. Computed by the Lan...
QString getAuthorName() const
Get landscape author name.
void createPolygonalHorizon(const QString &lineFileName, const float polyAngleRotateZ=0.0f, const QString &listMode="azDeg_altDeg")
Create a StelSphericalPolygon that describes a measured horizon line.
float angleRotateZ
vertical columns. May be given in landscape.ini:[landscape]tesselate_cols. More indicates higher accu...
horizonListMode
The list of azimuths (counted from True North towards East) and altitudes can come in various formats...
float getEffectiveLandFadeValue()
Returns the currently effective land fade value.