Stellarium 0.11.3
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

StelSkyDrawer Class Reference

Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level and instrument model. More...

#include <StelSkyDrawer.hpp>

List of all members.

Public Slots

void setRelativeStarScale (double b=1.0)
float getRelativeStarScale () const
void setAbsoluteStarScale (double b=1.0)
float getAbsoluteStarScale () const
void setTwinkleAmount (double b)
float getTwinkleAmount () const
void setFlagTwinkle (bool b)
bool getFlagTwinkle () const
void setFlagPointStar (bool b)
bool getFlagPointStar () const
void setBortleScale (int index)
int getBortleScale () const
float getLimitMagnitude () const
float getLimitLuminance () const
void setFlagLuminanceAdaptation (bool b)
bool getFlagLuminanceAdaptation () const
void setFlagHasAtmosphere (bool b)
bool getFlagHasAtmosphere () const
void setExtinctionCoefficient (double extCoeff)
double getExtinctionCoefficient () const
void setAtmosphereTemperature (double celsius)
double getAtmosphereTemperature () const
void setAtmospherePressure (double mbar)
double getAtmospherePressure () const
const ExtinctiongetExtinction () const
const RefractiongetRefraction () const
float getBig3dModelHaloRadius () const
void setBig3dModelHaloRadius (float r)

Public Member Functions

 StelSkyDrawer (StelCore *core)
 ~StelSkyDrawer ()
void init ()
void update (double deltaTime)
void preDrawPointSource (StelPainter *p)
void postDrawPointSource (StelPainter *sPainter)
bool drawPointSource (StelPainter *sPainter, const Vec3d &v, const float rcMag[2], unsigned int bV, bool checkInScreen=false)
bool drawPointSource (StelPainter *sPainter, const Vec3d &v, const float rcMag[2], const Vec3f &color, bool checkInScreen=false)
void postDrawSky3dModel (StelPainter *p, const Vec3d &v, float illuminatedArea, float mag, const Vec3f &color=Vec3f(1.f, 1.f, 1.f))
bool computeRCMag (float mag, float rcMag[2]) const
void reportLuminanceInFov (float 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 Vec3findexToColor (unsigned char bV)

Detailed Description

Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level and instrument model.


Member Function Documentation

bool StelSkyDrawer::computeRCMag ( float  mag,
float  rcMag[2] 
) const

Compute RMag and CMag from magnitude.

Parameters:
mag the object integrated V magnitude
rcMag array of 2 floats containing the radius and luminance
Returns:
false if the object is too faint to be displayed
bool StelSkyDrawer::drawPointSource ( StelPainter sPainter,
const Vec3d v,
const float  rcMag[2],
unsigned int  bV,
bool  checkInScreen = false 
) [inline]

Draw a point source halo.

Parameters:
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.
Returns:
true if the source was actually visible and drawn
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

Returns:
the limit V luminance at which an object will be visible
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.

Returns:
the limit V mag at which a point source will be displayed
static float StelSkyDrawer::luminanceToSurfacebrightness ( float  lum  )  [static]

Compute the surface brightness from the luminance of an extended source.

Parameters:
lum luminance in cd/m^2
Returns:
surface brightness in V magnitude/arcmin^2
void StelSkyDrawer::postDrawSky3dModel ( StelPainter p,
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.

Parameters:
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::preDrawPointSource ( StelPainter p  ) 

Set the proper openGL state before making calls to drawPointSource.

Parameters:
p a pointer to a valid instance of a Painter. The instance must be valid until postDrawPointSource() is called
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.

Parameters:
lum luminance in cd/m^2
fastAdaptation adapt the eye quickly if true, other wise use a smooth adaptation
void StelSkyDrawer::setFlagHasAtmosphere ( bool  b  )  [inline, slot]

Informing the drawer whether atmosphere is displayed.

This is used to avoid twinkling/simulate extinction/refraction.

static float StelSkyDrawer::surfacebrightnessToLuminance ( float  sb  )  [static]

Compute the luminance for an extended source with the given surface brightness.

Parameters:
sb surface brightness in V magnitude/arcmin^2
Returns:
the luminance in cd/m^2
void StelSkyDrawer::update ( double  deltaTime  ) 

Update with respect to the time and StelProjector/StelToneReproducer state.

Parameters:
deltaTime the time increment in second since last call.
Generated on Thu May 31 10:37:22 2012 for Stellarium by  doxygen 1.6.3