Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ
îðèãèíàëüíîãî äîêóìåíòà
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelSkyDrawer.html
Äàòà èçìåíåíèÿ: Unknown Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 07:29:12 2014 Êîäèðîâêà: Ïîèñêîâûå ñëîâà: ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï |
Stellarium 0.12.3
|
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... | |
float | 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... | |
float | getAbsoluteStarScale () const |
Get the absolute star brightness scale. More... | |
void | setTwinkleAmount (double b) |
Set source twinkle amount. More... | |
float | 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 | setDrawStarsAsPoints (bool b) |
Set flag for displaying point sources as points (faster on some hardware but not so nice). More... | |
bool | getDrawStarsAsPoints () const |
Get flag for displaying point sources as points (faster on some hardware but not so nice). More... | |
void | setBortleScale (int index) |
Set the parameters so that the stars disapear at about the limit given by the bortle scale The limit is valid only at a given zoom level (around 60 deg) See http://en.wikipedia.org/wiki/Bortle_Dark-Sky_Scale. More... | |
int | getBortleScale () 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... | |
void | setFlagNebulaMagnitudeLimit (bool b) |
Toggle the application of user-defined deep-sky object magnitude limit. More... | |
bool | getFlagStarMagnitudeLimit () const |
bool | getFlagNebulaMagnitudeLimit () const |
float | 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... | |
float | 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... | |
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 class. More... | |
const Refraction & | getRefraction () const |
Get the current valid fefraction computation class. 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... | |
Public Member Functions | |
StelSkyDrawer (StelCore *core, class StelRenderer *renderer) | |
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 () |
Prepare to draw point sources (must be called before drawing). More... | |
void | postDrawPointSource (StelProjectorP projector) |
Finalize the drawing of point sources. More... | |
bool | pointSourceVisible (StelProjector *projector, const Vec3f &v, const float rcMag[2], bool checkInScreen, Vec3f &outWindowCoordinates) |
Determine if a point source is visible (should be drawn). More... | |
void | drawPointSource (const Vec3f &win, const float rcMag[2], unsigned int bV) |
Draw a point source halo. More... | |
void | drawPointSource (const Vec3f &win, const float rcMag[2], const Vec3f &bcolor) |
void | drawSunCorona (StelProjectorP projector, const Vec3d &v, float radius, float alpha) |
Draw's the sun's corona during a solar eclipse on earth. More... | |
void | postDrawSky3dModel (StelProjectorP projector, const Vec3d &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, float rcMag[2]) 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... | |
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 39 of file StelSkyDrawer.hpp.
StelSkyDrawer::StelSkyDrawer | ( | StelCore * | core, |
class StelRenderer * | renderer | ||
) |
Constructor.
StelSkyDrawer::~StelSkyDrawer | ( | ) |
Destructor.
bool StelSkyDrawer::computeRCMag | ( | float | mag, |
float | rcMag[2] | ||
) | const |
Compute RMag and CMag from magnitude.
mag | the object integrated V magnitude |
rcMag | array of 2 floats containing the radius and luminance |
|
inline |
Draw a point source halo.
This is used in combination with pointSourceVisible (which avoids unnecessary draws and projects a point source to window coordinates).
Example:
win | Coordinates of the point source in the window (computed by pointSourceVisible) |
rcMag | the radius and luminance of the source as computed by computeRCMag() |
bV | the source B-V index |
Definition at line 103 of file StelSkyDrawer.hpp.
void StelSkyDrawer::drawSunCorona | ( | StelProjectorP | projector, |
const Vec3d & | v, | ||
float | radius, | ||
float | alpha | ||
) |
Draw's the sun's corona during a solar eclipse on earth.
|
inlineslot |
Get the absolute star brightness scale.
Definition at line 167 of file StelSkyDrawer.hpp.
|
inlineslot |
Get atmospheric (ground) pressure in mbar (for refraction).
Definition at line 249 of file StelSkyDrawer.hpp.
|
inlineslot |
Get atmospheric (ground) temperature in deg celsius (for refraction).
Definition at line 245 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the radius of the big halo texture used when a 3d model is very bright.
Definition at line 257 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 217 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the value used for forced star magnitude limiting.
Definition at line 212 of file StelSkyDrawer.hpp.
|
inlineslot |
Get flag for displaying point sources as points (faster on some hardware but not so nice).
Definition at line 182 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current valid extinction computation class.
Definition at line 252 of file StelSkyDrawer.hpp.
|
inlineslot |
Get extinction coefficient, mag/airmass (for extinction).
Definition at line 241 of file StelSkyDrawer.hpp.
|
inlineslot |
This is used to decide whether to apply refraction/extinction before rendering point sources et al.
Definition at line 236 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the current value of eye adaptation flag.
Definition at line 230 of file StelSkyDrawer.hpp.
|
inlineslot |
Definition at line 209 of file StelSkyDrawer.hpp.
|
inlineslot |
Definition at line 207 of file StelSkyDrawer.hpp.
|
inlineslot |
Get flag for source twinkling.
Definition at line 177 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 225 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 fefraction computation class.
Definition at line 254 of file StelSkyDrawer.hpp.
|
inlineslot |
Get the way brighter stars will look bigger as the fainter ones.
Definition at line 162 of file StelSkyDrawer.hpp.
|
inlineslot |
Get source twinkle amount.
Definition at line 172 of file StelSkyDrawer.hpp.
|
inlinestatic |
Convert quantized B-V index to float B-V.
Definition at line 147 of file StelSkyDrawer.hpp.
|
inlinestatic |
Convert quantized B-V index to RGB colors.
Definition at line 153 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 |
|
inline |
Determine if a point source is visible (should be drawn).
This function is separate from drawPointSource for optimization.
Also projects the point source to window coordinates.
projector | Projector to project the point source. |
v | the 3d position of the source in J2000 reference frame |
rcMag | the radius and luminance of the source as computed by computeRCMag() |
checkInScreen | Whether source in screen should be checked to avoid unnecessary drawing. |
outWindowCoordinates | Window coordinates out the point source are written here. |
Definition at line 75 of file StelSkyDrawer.hpp.
void StelSkyDrawer::postDrawPointSource | ( | StelProjectorP | projector | ) |
Finalize the drawing of point sources.
void StelSkyDrawer::postDrawSky3dModel | ( | StelProjectorP | projector, |
const Vec3d & | v, | ||
float | illuminatedArea, | ||
float | mag, | ||
const Vec3f & | color = Vec3f(1.f, 1.f, 1.f) |
||
) |
Terminate drawing of a 3D model, draw the halo.
projector | Projector 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 | ( | ) |
Prepare to draw point sources (must be called before drawing).
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 165 of file StelSkyDrawer.hpp.
|
inlineslot |
Set atmospheric (ground) pressure in mbar (for refraction).
Definition at line 247 of file StelSkyDrawer.hpp.
|
inlineslot |
Set atmospheric (ground) temperature in deg celsius (for refraction).
Definition at line 243 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the radius of the big halo texture used when a 3d model is very bright.
Definition at line 259 of file StelSkyDrawer.hpp.
|
slot |
Set the parameters so that the stars disapear at about the limit given by the bortle scale The limit is valid only at a given zoom level (around 60 deg) See http://en.wikipedia.org/wiki/Bortle_Dark-Sky_Scale.
|
inlineslot |
Sets a lower limit for nebula magnitudes (anything fainter is ignored).
In force only if flagNebulaMagnitudeLimit is set.
Definition at line 220 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 215 of file StelSkyDrawer.hpp.
|
inlineslot |
Set flag for displaying point sources as points (faster on some hardware but not so nice).
Definition at line 180 of file StelSkyDrawer.hpp.
|
inlineslot |
Set extinction coefficient, mag/airmass (for extinction).
Definition at line 239 of file StelSkyDrawer.hpp.
|
inlineslot |
Informing the drawer whether atmosphere is displayed.
This is used to avoid twinkling/simulate extinction/refraction.
Definition at line 234 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the value of the eye adaptation flag.
Definition at line 228 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 205 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 175 of file StelSkyDrawer.hpp.
|
inlineslot |
Set the way brighter stars will look bigger as the fainter ones.
Definition at line 160 of file StelSkyDrawer.hpp.
|
inlineslot |
Set source twinkle amount.
Definition at line 170 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 |
void StelSkyDrawer::update | ( | double | deltaTime | ) |
Update with respect to the time and StelProjector/StelToneReproducer state.
deltaTime | the time increment in second since last call. |