Stellarium 0.12.3
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
Landscape Class Referenceabstract

Store and manages the displaying of the Landscape. More...

#include <Landscape.hpp>

Classes

struct  landscapeTexCoord
 

Public Member Functions

 Landscape (float _radius=2.f)
 
virtual void load (const QSettings &landscapeIni, const QString &landscapeId)=0
 
virtual void draw (StelCore *core, class StelRenderer *renderer)=0
 Draw the landscape. More...
 
void update (double deltaTime)
 
void setBrightness (const float b)
 Set the brightness of the landscape. More...
 
void setFlagShow (const bool b)
 Set whether landscape is displayed (does not concern fog) More...
 
bool getFlagShow () const
 Get whether landscape is displayed (does not concern fog) More...
 
void setFlagShowFog (const bool b)
 Set whether fog is displayed. More...
 
bool getFlagShowFog () const
 Get whether fog is displayed. More...
 
QString getName () const
 Get landscape name. More...
 
QString getAuthorName () const
 Get landscape author name. More...
 
QString getDescription () const
 Get landscape description. More...
 
const StelLocationgetLocation () const
 Return the associated location or NULL. More...
 
int getDefaultBortleIndex () const
 Return default Bortle index (light pollution value) or -1 (unknown/no change) More...
 
int getDefaultFogSetting () const
 Return default fog setting (0/1) or -1 (no change) More...
 
float getDefaultAtmosphericExtinction () const
 Return default atmosperic extinction, mag/airmass, or -1 (no change) More...
 
float getDefaultAtmosphericTemperature () const
 Return default atmospheric temperature, for refraction computation, or -1000 for "unknown/no change". More...
 
float getDefaultAtmosphericPressure () const
 Return default atmospheric temperature, for refraction computation. More...
 
float getLandscapeNightBrightness () const
 Return default brightness for landscape returns -1 to signal "standard conditions" (use default value from config.ini) More...
 
void setZRotation (float d)
 Set the z-axis rotation (offset from original value when rotated. More...
 

Protected Member Functions

void loadCommon (const QSettings &landscapeIni, const QString &landscapeId)
 Load attributes common to all landscapes. More...
 
const QString getTexturePath (const QString &basename, const QString &landscapeId)
 search for a texture in landscape directory, else global textures directory More...
 

Protected Attributes

const float radius
 
QString name
 
float skyBrightness
 
float nightBrightness
 
float defaultBrightness
 
bool validLandscape
 
LinearFader landFader
 
LinearFader fogFader
 
QString author
 
QString description
 
int rows
 
int cols
 
int defaultBortleIndex
 
int defaultFogSetting
 
double defaultExtinctionCoefficient
 
double defaultTemperature
 
double defaultPressure
 
StelLocation location
 
float angleRotateZ
 
float angleRotateZOffset
 

Detailed Description

Store and manages the displaying of the Landscape.

Don't use this class direcly, use the LandscapeMgr.

Definition at line 42 of file Landscape.hpp.

Member Function Documentation

virtual void Landscape::draw ( StelCore core,
class StelRenderer renderer 
)
pure virtual

Draw the landscape.

Parameters
coreThe StelCore object.
rendererThe renderer to draw with.

Implemented in LandscapeSpherical, LandscapeFisheye, and LandscapeOldStyle.

QString Landscape::getAuthorName ( ) const
inline

Get landscape author name.

Definition at line 75 of file Landscape.hpp.

float Landscape::getDefaultAtmosphericExtinction ( ) const
inline

Return default atmosperic extinction, mag/airmass, or -1 (no change)

Definition at line 86 of file Landscape.hpp.

float Landscape::getDefaultAtmosphericPressure ( ) const
inline

Return default atmospheric temperature, for refraction computation.

returns -1 to signal "standard conditions", or -2 for "unknown/invalid/no change"

Definition at line 91 of file Landscape.hpp.

float Landscape::getDefaultAtmosphericTemperature ( ) const
inline

Return default atmospheric temperature, for refraction computation, or -1000 for "unknown/no change".

Definition at line 88 of file Landscape.hpp.

int Landscape::getDefaultBortleIndex ( ) const
inline

Return default Bortle index (light pollution value) or -1 (unknown/no change)

Definition at line 82 of file Landscape.hpp.

int Landscape::getDefaultFogSetting ( ) const
inline

Return default fog setting (0/1) or -1 (no change)

Definition at line 84 of file Landscape.hpp.

QString Landscape::getDescription ( ) const
inline

Get landscape description.

Definition at line 77 of file Landscape.hpp.

bool Landscape::getFlagShow ( ) const
inline

Get whether landscape is displayed (does not concern fog)

Definition at line 67 of file Landscape.hpp.

bool Landscape::getFlagShowFog ( ) const
inline

Get whether fog is displayed.

Definition at line 71 of file Landscape.hpp.

float Landscape::getLandscapeNightBrightness ( ) const
inline

Return default brightness for landscape returns -1 to signal "standard conditions" (use default value from config.ini)

Definition at line 94 of file Landscape.hpp.

const StelLocation& Landscape::getLocation ( ) const
inline

Return the associated location or NULL.

Definition at line 80 of file Landscape.hpp.

QString Landscape::getName ( ) const
inline

Get landscape name.

Definition at line 73 of file Landscape.hpp.

const QString Landscape::getTexturePath ( const QString &  basename,
const QString &  landscapeId 
)
protected

search for a texture in landscape directory, else global textures directory

Parameters
basenameThe name of a texture file, e.g. "fog.png"
landscapeIdThe landscape ID (directory name) to which the texture belongs
Exceptions
miscpossibility of throwing "file not found" exceptions
void Landscape::loadCommon ( const QSettings &  landscapeIni,
const QString &  landscapeId 
)
protected

Load attributes common to all landscapes.

Parameters
landscapeIniA reference to an existant QSettings object which describes the landscape
landscapeIdThe name of the directory for the landscape files (e.g. "ocean")
void Landscape::setBrightness ( const float  b)
inline

Set the brightness of the landscape.

Definition at line 62 of file Landscape.hpp.

void Landscape::setFlagShow ( const bool  b)
inline

Set whether landscape is displayed (does not concern fog)

Definition at line 65 of file Landscape.hpp.

void Landscape::setFlagShowFog ( const bool  b)
inline

Set whether fog is displayed.

Definition at line 69 of file Landscape.hpp.

void Landscape::setZRotation ( float  d)
inline

Set the z-axis rotation (offset from original value when rotated.

Definition at line 97 of file Landscape.hpp.


The documentation for this class was generated from the following file: