Stellarium 0.15.2
|
Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level, instrument model and artificially set magnitude limits. More...
#include <StelSkyDrawer.hpp>
Public Slots | |
void | setRelativeStarScale (double b=1.0) |
Set the way brighter stars will look bigger as the fainter ones. More... | |
double | getRelativeStarScale () const |
Get the way brighter stars will look bigger as the fainter ones. More... | |
void | setAbsoluteStarScale (double b=1.0) |
Set the absolute star brightness scale. More... | |
double | getAbsoluteStarScale () const |
Get the absolute star brightness scale. More... | |
void | setTwinkleAmount (double b) |
Set source twinkle amount. More... | |
double | getTwinkleAmount () const |
Get source twinkle amount. More... | |
void | setFlagTwinkle (bool b) |
Set flag for source twinkling. More... | |
bool | getFlagTwinkle () const |
Get flag for source twinkling. More... | |
void | setFlagForcedTwinkle (bool b) |
Set flag for enable twinkling of stars without atmosphere. More... | |
bool | getFlagForcedTwinkle () const |
Get flag for enable twinkling of stars without atmosphere. More... | |
void | setBortleScaleIndex (int index) |
Set the parameters so that the stars disappear at about the limit given by the bortle scale The limit is valid only at a given zoom level (around 60 deg) More... | |
int | getBortleScaleIndex () const |
Get the current Bortle scale index. More... | |
float | getLimitMagnitude () const |
Get the magnitude of the currently faintest visible point source It depends on the zoom level, on the eye adapation and on the point source rendering parameters. More... | |
void | setFlagStarMagnitudeLimit (bool b) |
Toggle the application of user-defined star magnitude limit. More... | |
bool | getFlagStarMagnitudeLimit () const |
void | setFlagNebulaMagnitudeLimit (bool b) |
Toggle the application of user-defined deep-sky object magnitude limit. More... | |
bool | getFlagNebulaMagnitudeLimit () const |
void | setFlagPlanetMagnitudeLimit (bool b) |
Toggle the application of user-defined solar system object magnitude limit. More... | |
bool | getFlagPlanetMagnitudeLimit () const |
double | getCustomStarMagnitudeLimit () const |
Get the value used for forced star magnitude limiting. More... | |
void | setCustomStarMagnitudeLimit (double limit) |
Sets a lower limit for star magnitudes (anything fainter is ignored). More... | |
double | getCustomNebulaMagnitudeLimit () const |
Get the value used for forced nebula magnitude limiting. More... | |
void | setCustomNebulaMagnitudeLimit (double limit) |
Sets a lower limit for nebula magnitudes (anything fainter is ignored). More... | |
double | getCustomPlanetMagnitudeLimit () const |
Get the value used for forced solar system object magnitude limiting. More... | |
void | setCustomPlanetMagnitudeLimit (double limit) |
Sets a lower limit for solar system object magnitudes (anything fainter is ignored). More... | |
float | getLimitLuminance () const |
Get the luminance of the faintest visible object (e.g. More... | |
void | setFlagLuminanceAdaptation (bool b) |
Set the value of the eye adaptation flag. More... | |
bool | getFlagLuminanceAdaptation () const |
Get the current value of eye adaptation flag. More... | |
void | setFlagHasAtmosphere (bool b) |
Informing the drawer whether atmosphere is displayed. More... | |
bool | getFlagHasAtmosphere () const |
This is used to decide whether to apply refraction/extinction before rendering point sources et al. More... | |
void | setExtinctionCoefficient (double extCoeff) |
Set extinction coefficient, mag/airmass (for extinction). More... | |
double | getExtinctionCoefficient () const |
Get extinction coefficient, mag/airmass (for extinction). More... | |
void | setAtmosphereTemperature (double celsius) |
Set atmospheric (ground) temperature in deg celsius (for refraction). More... | |
double | getAtmosphereTemperature () const |
Get atmospheric (ground) temperature in deg celsius (for refraction). More... | |
void | setAtmospherePressure (double mbar) |
Set atmospheric (ground) pressure in mbar (for refraction). More... | |
double | getAtmospherePressure () const |
Get atmospheric (ground) pressure in mbar (for refraction). More... | |
const Extinction & | getExtinction () const |
Get the current valid extinction computation object. More... | |
const Refraction & | getRefraction () const |
Get the current valid refraction computation object. More... | |
float | getBig3dModelHaloRadius () const |
Get the radius of the big halo texture used when a 3d model is very bright. More... | |
void | setBig3dModelHaloRadius (float r) |
Set the radius of the big halo texture used when a 3d model is very bright. More... | |
Signals | |
void | relativeStarScaleChanged (double b) |
Emitted whenever the relative star scale changed. More... | |
void | absoluteStarScaleChanged (double b) |
Emitted whenever the absolute star scale changed. More... | |
void | twinkleAmountChanged (double b) |
Emitted whenever the twinkle amount changed. More... | |
void | flagTwinkleChanged (bool b) |
Emitted whenever the twinkle flag is toggled. More... | |
void | bortleScaleIndexChanged (int index) |
Emitted whenever the Bortle scale index changed. More... | |
void | flagStarMagnitudeLimitChanged (bool b) |
Emitted whenever the star magnitude limit flag is toggled. More... | |
void | flagNebulaMagnitudeLimitChanged (bool b) |
Emitted whenever the nebula magnitude limit flag is toggled. More... | |
void | flagPlanetMagnitudeLimitChanged (bool b) |
Emitted whenever the planet magnitude limit flag is toggled. More... | |
void | customStarMagLimitChanged (double limit) |
Emitted whenever the star magnitude limit changed. More... | |
void | customNebulaMagLimitChanged (double limit) |
Emitted whenever the nebula magnitude limit changed. More... | |
void | customPlanetMagLimitChanged (double limit) |
Emitted whenever the planet magnitude limit changed. More... | |
void | flagLuminanceAdaptationChanged (bool b) |
Emitted whenever the luminance adaptation flag is toggled. More... | |
void | extinctionCoefficientChanged (double coeff) |
void | atmosphereTemperatureChanged (double celsius) |
void | atmospherePressureChanged (double mbar) |
Public Member Functions | |
StelSkyDrawer (StelCore *core) | |
Constructor. More... | |
~StelSkyDrawer () | |
Destructor. More... | |
void | init () |
Init parameters from config file. More... | |
void | update (double deltaTime) |
Update with respect to the time and StelProjector/StelToneReproducer state. More... | |
void | preDrawPointSource (StelPainter *p) |
Set the proper openGL state before making calls to drawPointSource. More... | |
void | postDrawPointSource (StelPainter *sPainter) |
Finalize the drawing of point sources. More... | |
bool | drawPointSource (StelPainter *sPainter, const Vec3f &v, const RCMag &rcMag, unsigned int bV, bool checkInScreen=false, float twinkleFactor=1.0f) |
Draw a point source halo. More... | |
bool | drawPointSource (StelPainter *sPainter, const Vec3f &v, const RCMag &rcMag, const Vec3f &bcolor, bool checkInScreen=false, float twinkleFactor=1.0f) |
void | drawSunCorona (StelPainter *painter, const Vec3f &v, float radius, const Vec3f &color, const float alpha) |
void | postDrawSky3dModel (StelPainter *p, const Vec3f &v, float illuminatedArea, float mag, const Vec3f &color=Vec3f(1.f, 1.f, 1.f)) |
Terminate drawing of a 3D model, draw the halo. More... | |
bool | computeRCMag (float mag, RCMag *) const |
Compute RMag and CMag from magnitude. More... | |
void | reportLuminanceInFov (float lum, bool fastAdaptation=false) |
Report that an object of luminance lum with an on-screen area of area pixels is currently displayed This information is used to determine the world adaptation luminance This method should be called during the update operations of the main loop. More... | |
void | preDraw () |
To be called before the drawing stage starts. More... | |
Static Public Member Functions | |
static float | surfacebrightnessToLuminance (float sb) |
Compute the luminance for an extended source with the given surface brightness. More... | |
static float | luminanceToSurfacebrightness (float lum) |
Compute the surface brightness from the luminance of an extended source. More... | |
static float | indexToBV (unsigned char bV) |
Convert quantized B-V index to float B-V. More... | |
static const Vec3f & | indexToColor (unsigned char bV) |
Convert quantized B-V index to RGB colors. More... | |
Properties | |
double | relativeStarScale |
Sets how much brighter stars will be bigger than fainter stars. More... | |
double | absoluteStarScale |
The absolute star brightness scale. More... | |
double | twinkleAmount |
bool | flagTwinkle |
int | bortleScaleIndex |
The current Bortle Scale index. More... | |
bool | flagStarMagnitudeLimit |
Controls the application of the user-defined star magnitude limit. More... | |
bool | flagNebulaMagnitudeLimit |
Controls the application of the user-defined nebula magnitude limit. More... | |
bool | flagPlanetMagnitudeLimit |
Controls the application of the user-defined planet magnitude limit. More... | |
double | customStarMagLimit |
User-defined magnitude limit for stars. More... | |
double | customNebulaMagLimit |
User-defined magnitude limit for deep-sky objects. More... | |
double | customPlanetMagLimit |
User-defined magnitude limit for solar system objects. More... | |
bool | flagLuminanceAdaptation |
double | extinctionCoefficient |
double | atmosphereTemperature |
double | atmospherePressure |
Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level, instrument model and artificially set magnitude limits.
Definition at line 46 of file StelSkyDrawer.hpp.
StelSkyDrawer::StelSkyDrawer | ( | StelCore * | core | ) |
Constructor.
StelSkyDrawer::~StelSkyDrawer | ( | ) |
Destructor.
|
signal |
Emitted whenever the absolute star scale changed.
|
signal |
Emitted whenever the Bortle scale index changed.
bool StelSkyDrawer::computeRCMag | ( | float | mag, |
RCMag * | |||
) | const |
Compute RMag and CMag from magnitude.
mag | the object integrated V magnitude |
rcMag | array of 2 floats containing the radius and luminance |
|
signal |
Emitted whenever the nebula magnitude limit changed.
|
signal |
Emitted whenever the planet magnitude limit changed.
|
signal |
Emitted whenever the star magnitude limit changed.
|
inline |
Draw a point source halo.
sPainter | the StelPainter to use for drawing. |
v | the 3d position of the source in J2000 reference frame |
rcMag | the radius and luminance of the source as computed by computeRCMag() |
bV | the source B-V index |
checkInScreen | whether source in screen should be checked to avoid unnecessary drawing. |
twinkleFactor | allows height-dependent twinkling. Recommended value: min(1,1-0.9*sin(altitude)). Allowed values [0..1] |
Definition at line 101 of file StelSkyDrawer.hpp.
|
signal |
Emitted whenever the luminance adaptation flag is toggled.
|
signal |
Emitted whenever the nebula magnitude limit flag is toggled.
|
signal |
Emitted whenever the planet magnitude limit flag is toggled.
|
signal |
Emitted whenever the star magnitude limit flag is toggled.
|
signal |
Emitted whenever the twinkle flag is toggled.
|
inlineslot |
Get the absolute star brightness scale.
Definition at line 164 of file StelSkyDrawer.hpp.
|
inlineslot |
Get atmospheric (ground) pressure in mbar (for refraction).
Definition at line 261 of file StelSkyDrawer.hpp.
|
inlineslot |
Get atmospheric (ground) temperature in deg celsius (for refraction).
Definition at line 257 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the radius of the big halo texture used when a 3d model is very bright.
Definition at line 269 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current Bortle scale index.
Definition at line 189 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the value used for forced nebula magnitude limiting.
Definition at line 224 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the value used for forced solar system object magnitude limiting.
Definition at line 229 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the value used for forced star magnitude limiting.
Definition at line 219 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current valid extinction computation object.
Definition at line 264 of file StelSkyDrawer.hpp.
|
inlineslot |
Get extinction coefficient, mag/airmass (for extinction).
Definition at line 253 of file StelSkyDrawer.hpp.
|
inlineslot |
Get flag for enable twinkling of stars without atmosphere.
Definition at line 181 of file StelSkyDrawer.hpp.
|
inlineslot |
This is used to decide whether to apply refraction/extinction before rendering point sources et al.
Definition at line 248 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current value of eye adaptation flag.
Definition at line 242 of file StelSkyDrawer.hpp.
|
inlineslot |
Definition at line 209 of file StelSkyDrawer.hpp.
|
inlineslot |
Definition at line 216 of file StelSkyDrawer.hpp.
|
inlineslot |
Definition at line 202 of file StelSkyDrawer.hpp.
|
inlineslot |
Get flag for source twinkling.
Definition at line 174 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the luminance of the faintest visible object (e.g.
RGB<0.05) It depends on the zoom level, on the eye adapation and on the point source rendering parameters
Definition at line 237 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the magnitude of the currently faintest visible point source It depends on the zoom level, on the eye adapation and on the point source rendering parameters.
Definition at line 194 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current valid refraction computation object.
Definition at line 266 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the way brighter stars will look bigger as the fainter ones.
Definition at line 159 of file StelSkyDrawer.hpp.
|
inlineslot |
Get source twinkle amount.
Definition at line 169 of file StelSkyDrawer.hpp.
|
inlinestatic |
Convert quantized B-V index to float B-V.
Definition at line 144 of file StelSkyDrawer.hpp.
|
inlinestatic |
Convert quantized B-V index to RGB colors.
Definition at line 150 of file StelSkyDrawer.hpp.
void StelSkyDrawer::init | ( | ) |
Init parameters from config file.
|
static |
Compute the surface brightness from the luminance of an extended source.
lum | luminance in cd/m^2 |
void StelSkyDrawer::postDrawPointSource | ( | StelPainter * | sPainter | ) |
Finalize the drawing of point sources.
void StelSkyDrawer::postDrawSky3dModel | ( | StelPainter * | p, |
const Vec3f & | v, | ||
float | illuminatedArea, | ||
float | mag, | ||
const Vec3f & | color = Vec3f(1.f, 1.f, 1.f) |
||
) |
Terminate drawing of a 3D model, draw the halo.
p | the StelPainter instance to use for this drawing operation |
v | the 3d position of the source in J2000 reference frame |
illuminatedArea | the illuminated area in arcmin^2 |
mag | the source integrated magnitude |
color | the object halo RGB color |
void StelSkyDrawer::preDraw | ( | ) |
To be called before the drawing stage starts.
void StelSkyDrawer::preDrawPointSource | ( | StelPainter * | p | ) |
Set the proper openGL state before making calls to drawPointSource.
p | a pointer to a valid instance of a Painter. The instance must be valid until postDrawPointSource() is called |
|
signal |
Emitted whenever the relative star scale changed.
void StelSkyDrawer::reportLuminanceInFov | ( | float | lum, |
bool | fastAdaptation = false |
||
) |
Report that an object of luminance lum with an on-screen area of area pixels is currently displayed This information is used to determine the world adaptation luminance This method should be called during the update operations of the main loop.
lum | luminance in cd/m^2 |
fastAdaptation | adapt the eye quickly if true, other wise use a smooth adaptation |
|
inlineslot |
Set the absolute star brightness scale.
Definition at line 162 of file StelSkyDrawer.hpp.
|
inlineslot |
Set atmospheric (ground) pressure in mbar (for refraction).
Definition at line 259 of file StelSkyDrawer.hpp.
|
inlineslot |
Set atmospheric (ground) temperature in deg celsius (for refraction).
Definition at line 255 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the radius of the big halo texture used when a 3d model is very bright.
Definition at line 271 of file StelSkyDrawer.hpp.
|
slot |
Set the parameters so that the stars disappear at about the limit given by the bortle scale The limit is valid only at a given zoom level (around 60 deg)
|
inlineslot |
Sets a lower limit for nebula magnitudes (anything fainter is ignored).
In force only if flagNebulaMagnitudeLimit is set.
Definition at line 227 of file StelSkyDrawer.hpp.
|
inlineslot |
Sets a lower limit for solar system object magnitudes (anything fainter is ignored).
In force only if flagPlanetMagnitudeLimit is set.
Definition at line 232 of file StelSkyDrawer.hpp.
|
inlineslot |
Sets a lower limit for star magnitudes (anything fainter is ignored).
In force only if flagStarMagnitudeLimit is set.
Definition at line 222 of file StelSkyDrawer.hpp.
|
inlineslot |
Set extinction coefficient, mag/airmass (for extinction).
Definition at line 251 of file StelSkyDrawer.hpp.
|
inlineslot |
Set flag for enable twinkling of stars without atmosphere.
Definition at line 178 of file StelSkyDrawer.hpp.
|
inlineslot |
Informing the drawer whether atmosphere is displayed.
This is used to avoid twinkling/simulate extinction/refraction.
Definition at line 246 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the value of the eye adaptation flag.
Definition at line 240 of file StelSkyDrawer.hpp.
|
inlineslot |
Toggle the application of user-defined deep-sky object magnitude limit.
If enabled, deep-sky objects fainter than the magnitude set with setCustomNebulaMagnitudeLimit() will not be displayed.
Definition at line 207 of file StelSkyDrawer.hpp.
|
inlineslot |
Toggle the application of user-defined solar system object magnitude limit.
If enabled, planets, planetary moons, asteroids (KBO, ...) and comets fainter than the magnitude set with setCustomPlanetMagnitudeLimit() will not be displayed.
Definition at line 214 of file StelSkyDrawer.hpp.
|
inlineslot |
Toggle the application of user-defined star magnitude limit.
If enabled, stars fainter than the magnitude set with setCustomStarMagnitudeLimit() will not be displayed.
Definition at line 200 of file StelSkyDrawer.hpp.
|
inlineslot |
Set flag for source twinkling.
Definition at line 172 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the way brighter stars will look bigger as the fainter ones.
Definition at line 157 of file StelSkyDrawer.hpp.
|
inlineslot |
Set source twinkle amount.
Definition at line 167 of file StelSkyDrawer.hpp.
|
static |
Compute the luminance for an extended source with the given surface brightness.
sb | surface brightness in V magnitude/arcmin^2 |
|
signal |
Emitted whenever the twinkle amount changed.
void StelSkyDrawer::update | ( | double | deltaTime | ) |
Update with respect to the time and StelProjector/StelToneReproducer state.
deltaTime | the time increment in second since last call. |
|
readwrite |
The absolute star brightness scale.
Definition at line 53 of file StelSkyDrawer.hpp.
|
readwrite |
The current Bortle Scale index.
Definition at line 56 of file StelSkyDrawer.hpp.
|
readwrite |
User-defined magnitude limit for deep-sky objects.
Interpreted as a lower limit - nebulae fainter than this value will not be displayed. Used if flagNebulaMagnitudeLimit is true.
Definition at line 63 of file StelSkyDrawer.hpp.
|
readwrite |
User-defined magnitude limit for solar system objects.
Interpreted as a lower limit - planets fainter than this value will not be displayed. Used if flagPlanetMagnitudeLimit is true.
Definition at line 64 of file StelSkyDrawer.hpp.
|
readwrite |
User-defined magnitude limit for stars.
Interpreted as a lower limit - stars fainter than this value will not be displayed. Used if flagStarMagnitudeLimit is true.
Definition at line 62 of file StelSkyDrawer.hpp.
|
readwrite |
Controls the application of the user-defined nebula magnitude limit.
Definition at line 59 of file StelSkyDrawer.hpp.
|
readwrite |
Controls the application of the user-defined planet magnitude limit.
Definition at line 60 of file StelSkyDrawer.hpp.
|
readwrite |
Controls the application of the user-defined star magnitude limit.
Definition at line 58 of file StelSkyDrawer.hpp.
|
readwrite |
Sets how much brighter stars will be bigger than fainter stars.
Definition at line 51 of file StelSkyDrawer.hpp.