![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <StelSkyDrawer.hpp>
Public Slots | |
void | setRelativeStarScale (double b=1.0) |
double | getRelativeStarScale (void) const |
void | setAbsoluteStarScale (double b=1.0) |
double | getAbsoluteStarScale (void) const |
void | setTwinkleAmount (double b) |
double | getTwinkleAmount (void) const |
void | setFlagTwinkle (bool b) |
bool | getFlagTwinkle (void) const |
void | setFlagPointStar (bool b) |
bool | getFlagPointStar (void) const |
void | setBortleScale (int index) |
int | getBortleScale () const |
float | getLimitMagnitude () const |
float | getLimitLuminance () const |
void | setFlagLuminanceAdaptation (bool b) |
bool | getFlagLuminanceAdaptation (void) const |
Public Member Functions | |
StelSkyDrawer (StelCore *core) | |
~StelSkyDrawer () | |
void | init () |
void | update (double deltaTime) |
const StelPainter * | getPainter () |
void | preDrawPointSource (const StelPainter *p) |
void | postDrawPointSource () |
bool | drawPointSource (double x, double y, const float rcMag[2], unsigned int bV) |
bool | drawPointSource (double x, double y, const float rcMag[2], const Vec3f &color) |
bool | drawDiskSource (double x, double y, double r, float mag, const Vec3f &color) |
void | postDrawSky3dModel (double x, double y, double illuminatedArea, float mag, const StelPainter *p, const Vec3f &color=Vec3f(1.f, 1.f, 1.f)) |
bool | computeRCMag (float mag, float rcMag[2]) const |
void | reportLuminanceInFov (double lum, bool fastAdaptation=false) |
void | preDraw () |
Static Public Member Functions | |
static float | surfacebrightnessToLuminance (float sb) |
static float | luminanceToSurfacebrightness (float lum) |
static float | indexToBV (unsigned char bV) |
static const Vec3f & | indexToColor (unsigned char bV) |
StelSkyDrawer::StelSkyDrawer | ( | StelCore * | core | ) |
Constructor.
StelSkyDrawer::~StelSkyDrawer | ( | ) |
Destructor.
void StelSkyDrawer::init | ( | ) |
Init parameters from config file.
void StelSkyDrawer::update | ( | double | deltaTime | ) |
Update with respect to the time and StelProjector/StelToneReproducer state.
deltaTime | the time increment in second since last call. |
const StelPainter* StelSkyDrawer::getPainter | ( | ) | [inline] |
Get the painter currently used or NULL.
void StelSkyDrawer::preDrawPointSource | ( | const 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 |
void StelSkyDrawer::postDrawPointSource | ( | ) |
Finalize the drawing of point sources.
bool StelSkyDrawer::drawPointSource | ( | double | x, | |
double | y, | |||
const float | rcMag[2], | |||
unsigned int | bV | |||
) | [inline] |
Draw a point source halo.
x | the x position of the object on the screen | |
y | the y position of the object on the screen | |
rcMag | the radius and luminance of the source as computed by computeRCMag() | |
bV | the source B-V index |
bool StelSkyDrawer::drawDiskSource | ( | double | x, | |
double | y, | |||
double | r, | |||
float | mag, | |||
const Vec3f & | color | |||
) |
Draw a disk source halo.
The real surface brightness is smaller as if it were a point source because the flux is spread on the disk area
x | the x position of the disk center in pixel | |
y | the y position of the disk centre in pixel | |
r | radius of the disk in pixel | |
mag | the source integrated magnitude | |
color | the source RGB color |
void StelSkyDrawer::postDrawSky3dModel | ( | double | x, | |
double | y, | |||
double | illuminatedArea, | |||
float | mag, | |||
const StelPainter * | p, | |||
const Vec3f & | color = Vec3f(1.f, 1.f, 1.f) | |||
) |
Terminate drawing of a 3D model, draw the halo.
x | the x position of the object centroid in pixel | |
y | the y position of the object centroid in pixel | |
illuminatedArea | the illuminated area in arcmin^2 | |
mag | the source integrated magnitude | |
p | the StelPainter instance to use for this drawing operation | |
color | the object halo RGB color |
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 |
void StelSkyDrawer::reportLuminanceInFov | ( | double | 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 |
void StelSkyDrawer::preDraw | ( | ) |
To be called before the drawing stage starts.
static float StelSkyDrawer::surfacebrightnessToLuminance | ( | float | sb | ) | [static] |
Compute the luminance for an extended source with the given surface brightness.
sb | surface brightness in V magnitude/arcmin^2 |
static float StelSkyDrawer::luminanceToSurfacebrightness | ( | float | lum | ) | [static] |
Compute the surface brightness from the luminance of an extended source.
lum | luminance in cd/m^2 |
static float StelSkyDrawer::indexToBV | ( | unsigned char | bV | ) | [inline, static] |
Convert quantized B-V index to float B-V.
static const Vec3f& StelSkyDrawer::indexToColor | ( | unsigned char | bV | ) | [inline, static] |
Convert quantized B-V index to RGB colors.
void StelSkyDrawer::setRelativeStarScale | ( | double | b = 1.0 |
) | [inline, slot] |
Set the way brighter stars will look bigger as the fainter ones.
double StelSkyDrawer::getRelativeStarScale | ( | void | ) | const [inline, slot] |
Get the way brighter stars will look bigger as the fainter ones.
void StelSkyDrawer::setAbsoluteStarScale | ( | double | b = 1.0 |
) | [inline, slot] |
Set the absolute star brightness scale.
double StelSkyDrawer::getAbsoluteStarScale | ( | void | ) | const [inline, slot] |
Get the absolute star brightness scale.
void StelSkyDrawer::setTwinkleAmount | ( | double | b | ) | [inline, slot] |
Set source twinkle amount.
double StelSkyDrawer::getTwinkleAmount | ( | void | ) | const [inline, slot] |
Get source twinkle amount.
void StelSkyDrawer::setFlagTwinkle | ( | bool | b | ) | [inline, slot] |
Set flag for source twinkling.
bool StelSkyDrawer::getFlagTwinkle | ( | void | ) | const [inline, slot] |
Get flag for source twinkling.
void StelSkyDrawer::setFlagPointStar | ( | bool | b | ) | [inline, slot] |
Set flag for displaying point sources as GLpoints (faster on some hardware but not so nice).
bool StelSkyDrawer::getFlagPointStar | ( | void | ) | const [inline, slot] |
Get flag for displaying point sources as GLpoints (faster on some hardware but not so nice).
void StelSkyDrawer::setBortleScale | ( | int | index | ) | [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.
int StelSkyDrawer::getBortleScale | ( | ) | const [inline, slot] |
Get the current Bortle scale index.
float StelSkyDrawer::getLimitMagnitude | ( | ) | const [inline, slot] |
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.
float StelSkyDrawer::getLimitLuminance | ( | ) | const [inline, slot] |
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
void StelSkyDrawer::setFlagLuminanceAdaptation | ( | bool | b | ) | [inline, slot] |
Set the value of the eye adaptation flag.
bool StelSkyDrawer::getFlagLuminanceAdaptation | ( | void | ) | const [inline, slot] |
Get the current value of eye adaptation flag.