StelSkyDrawer.hpp   StelSkyDrawer.hpp 
skipping to change at line 60 skipping to change at line 60
void update(double deltaTime); void update(double deltaTime);
//! Set the proper openGL state before making calls to drawPointSour ce //! Set the proper openGL state before making calls to drawPointSour ce
//! @param p a pointer to a valid instance of a Painter. The instanc e must be valid until postDrawPointSource() is called //! @param p a pointer to a valid instance of a Painter. The instanc e must be valid until postDrawPointSource() is called
void preDrawPointSource(StelPainter* p); void preDrawPointSource(StelPainter* p);
//! Finalize the drawing of point sources //! Finalize the drawing of point sources
void postDrawPointSource(StelPainter* sPainter); void postDrawPointSource(StelPainter* sPainter);
//! Draw a point source halo. //! Draw a point source halo.
//! @param sPainter the StelPainter to use for drawing.
//! @param v the 3d position of the source in J2000 reference frame //! @param v the 3d position of the source in J2000 reference frame
//! @param rcMag the radius and luminance of the source as computed by computeRCMag() //! @param rcMag the radius and luminance of the source as computed by computeRCMag()
//! @param bV the source B-V index //! @param bV the source B-V index
//! @param checkInScreen whether source in screen should be checked to avoid unnecessary drawing.
//! @return true if the source was actually visible and drawn //! @return true if the source was actually visible and drawn
bool drawPointSource(StelPainter* sPainter, const Vec3d& v, const fl oat rcMag[2], unsigned int bV, bool checkInScreen=false) bool drawPointSource(StelPainter* sPainter, const Vec3f& v, const fl oat rcMag[2], unsigned int bV, bool checkInScreen=false)
{return drawPointSource(sPainter, v, rcMag, colorTable[bV], checkInScreen);} {return drawPointSource(sPainter, v, rcMag, colorTable[bV], checkInScreen);}
bool drawPointSource(StelPainter* sPainter,const Vec3d& v, const flo at rcMag[2], const Vec3f& color, bool checkInScreen=false); bool drawPointSource(StelPainter* sPainter,const Vec3f& v, const flo at rcMag[2], const Vec3f& color, bool checkInScreen=false);
//! Terminate drawing of a 3D model, draw the halo //! Terminate drawing of a 3D model, draw the halo
//! @param p the StelPainter instance to use for this drawing operat ion
//! @param v the 3d position of the source in J2000 reference frame //! @param v the 3d position of the source in J2000 reference frame
//! @param illuminatedArea the illuminated area in arcmin^2 //! @param illuminatedArea the illuminated area in arcmin^2
//! @param mag the source integrated magnitude //! @param mag the source integrated magnitude
//! @param p the StelPainter instance to use for this drawing operat ion
//! @param color the object halo RGB color //! @param color the object halo RGB color
void postDrawSky3dModel(StelPainter* sPainter, const Vec3d& v, doubl e illuminatedArea, float mag, const Vec3f& color = Vec3f(1.f,1.f,1.f)); void postDrawSky3dModel(StelPainter* p, const Vec3f& v, float illumi natedArea, float mag, const Vec3f& color = Vec3f(1.f,1.f,1.f));
//! Compute RMag and CMag from magnitude. //! Compute RMag and CMag from magnitude.
//! @param mag the object integrated V magnitude //! @param mag the object integrated V magnitude
//! @param rcMag array of 2 floats containing the radius and luminan ce //! @param rcMag array of 2 floats containing the radius and luminan ce
//! @return false if the object is too faint to be displayed //! @return false if the object is too faint to be displayed
bool computeRCMag(float mag, float rcMag[2]) const; bool computeRCMag(float mag, float rcMag[2]) const;
//! Report that an object of luminance lum with an on-screen area of area pixels is currently displayed //! 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 lumin ance //! This information is used to determine the world adaptation lumin ance
//! This method should be called during the update operations of the main loop //! This method should be called during the update operations of the main loop
//! @param lum luminance in cd/m^2 //! @param lum luminance in cd/m^2
//! @param fastAdaptation adapt the eye quickly if true, other wise use a smooth adaptation //! @param fastAdaptation adapt the eye quickly if true, other wise use a smooth adaptation
void reportLuminanceInFov(double lum, bool fastAdaptation=false); void reportLuminanceInFov(float lum, bool fastAdaptation=false);
//! To be called before the drawing stage starts //! To be called before the drawing stage starts
void preDraw(); void preDraw();
//! Compute the luminance for an extended source with the given surf ace brightness //! Compute the luminance for an extended source with the given surf ace brightness
//! @param sb surface brightness in V magnitude/arcmin^2 //! @param sb surface brightness in V magnitude/arcmin^2
//! @return the luminance in cd/m^2 //! @return the luminance in cd/m^2
static float surfacebrightnessToLuminance(float sb); static float surfacebrightnessToLuminance(float sb);
//! Compute the surface brightness from the luminance of an extended source //! Compute the surface brightness from the luminance of an extended source
//! @param lum luminance in cd/m^2 //! @param lum luminance in cd/m^2
skipping to change at line 118 skipping to change at line 120
//! Convert quantized B-V index to RGB colors //! Convert quantized B-V index to RGB colors
static inline const Vec3f& indexToColor(unsigned char bV) static inline const Vec3f& indexToColor(unsigned char bV)
{ {
return colorTable[bV]; return colorTable[bV];
} }
public slots: public slots:
//! Set the way brighter stars will look bigger as the fainter ones //! Set the way brighter stars will look bigger as the fainter ones
void setRelativeStarScale(double b=1.0) {starRelativeScale=b;} void setRelativeStarScale(double b=1.0) {starRelativeScale=b;}
//! Get the way brighter stars will look bigger as the fainter ones //! Get the way brighter stars will look bigger as the fainter ones
double getRelativeStarScale(void) const {return starRelativeScale;} float getRelativeStarScale() const {return starRelativeScale;}
//! Set the absolute star brightness scale //! Set the absolute star brightness scale
void setAbsoluteStarScale(double b=1.0) {starAbsoluteScaleF=b;} void setAbsoluteStarScale(double b=1.0) {starAbsoluteScaleF=b;}
//! Get the absolute star brightness scale //! Get the absolute star brightness scale
double getAbsoluteStarScale(void) const {return starAbsoluteScaleF;} float getAbsoluteStarScale() const {return starAbsoluteScaleF;}
//! Set source twinkle amount. //! Set source twinkle amount.
void setTwinkleAmount(double b) {twinkleAmount=b;} void setTwinkleAmount(double b) {twinkleAmount=b;}
//! Get source twinkle amount. //! Get source twinkle amount.
double getTwinkleAmount(void) const {return twinkleAmount;} float getTwinkleAmount() const {return twinkleAmount;}
//! Set flag for source twinkling. //! Set flag for source twinkling.
void setFlagTwinkle(bool b) {flagStarTwinkle=b;} void setFlagTwinkle(bool b) {flagStarTwinkle=b;}
//! Get flag for source twinkling. //! Get flag for source twinkling.
bool getFlagTwinkle(void) const {return flagStarTwinkle;} bool getFlagTwinkle() const {return flagStarTwinkle;}
//! Set flag for displaying point sources as GLpoints (faster on som e hardware but not so nice). //! Set flag for displaying point sources as GLpoints (faster on som e hardware but not so nice).
void setFlagPointStar(bool b) {flagPointStar=b;} void setFlagPointStar(bool b) {flagPointStar=b;}
//! Get flag for displaying point sources as GLpoints (faster on som e hardware but not so nice). //! Get flag for displaying point sources as GLpoints (faster on som e hardware but not so nice).
bool getFlagPointStar(void) const {return flagPointStar;} bool getFlagPointStar() const {return flagPointStar;}
//! Set the parameters so that the stars disapear at about the limit given by the bortle scale //! 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) //! The limit is valid only at a given zoom level (around 60 deg)
//! See http://en.wikipedia.org/wiki/Bortle_Dark-Sky_Scale //! See http://en.wikipedia.org/wiki/Bortle_Dark-Sky_Scale
void setBortleScale(int index); void setBortleScale(int index);
//! Get the current Bortle scale index //! Get the current Bortle scale index
int getBortleScale() const {return bortleScaleIndex;} int getBortleScale() const {return bortleScaleIndex;}
//! Get the magnitude of the currently faintest visible point source //! Get the magnitude of the currently faintest visible point source
//! It depends on the zoom level, on the eye adapation and on the po int source rendering parameters //! It depends on the zoom level, on the eye adapation and on the po int source rendering parameters
skipping to change at line 162 skipping to change at line 164
//! Get the luminance of the faintest visible object (e.g. RGB<0.05) //! 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 po int source rendering parameters //! It depends on the zoom level, on the eye adapation and on the po int source rendering parameters
//! @return the limit V luminance at which an object will be visible //! @return the limit V luminance at which an object will be visible
float getLimitLuminance() const {return limitLuminance;} float getLimitLuminance() const {return limitLuminance;}
//! Set the value of the eye adaptation flag //! Set the value of the eye adaptation flag
void setFlagLuminanceAdaptation(bool b) {flagLuminanceAdaptation=b;} void setFlagLuminanceAdaptation(bool b) {flagLuminanceAdaptation=b;}
//! Get the current value of eye adaptation flag //! Get the current value of eye adaptation flag
bool getFlagLuminanceAdaptation(void) const {return flagLuminanceAda ptation;} bool getFlagLuminanceAdaptation(void) const {return flagLuminanceAda ptation;}
//! Informing the drawer whether atmosphere is displayed.
//! This is used to avoid twinkling/simulate extinction/refraction.
void setFlagHasAtmosphere(bool b) {flagHasAtmosphere=b;}
private: private:
// Debug // Debug
float reverseComputeRCMag(float rmag) const; float reverseComputeRCMag(float rmag) const;
//! Compute the current limit magnitude by dichotomy //! Compute the current limit magnitude by dichotomy
float computeLimitMagnitude() const; float computeLimitMagnitude() const;
//! Compute the current limit luminance by dichotomy //! Compute the current limit luminance by dichotomy
float computeLimitLuminance() const; float computeLimitLuminance() const;
skipping to change at line 189 skipping to change at line 195
//! Get StelSkyDrawer minimum FOV. //! Get StelSkyDrawer minimum FOV.
float getMinAdaptFov(void) const {return minAdaptFov;} float getMinAdaptFov(void) const {return minAdaptFov;}
//! Set StelSkyDrawer minimum FOV. //! Set StelSkyDrawer minimum FOV.
//! Usually stars/planet halos are drawn brighter when FOV gets smal ler. //! Usually stars/planet halos are drawn brighter when FOV gets smal ler.
//! But when FOV gets smaller than this value, the stars do not beco me //! But when FOV gets smaller than this value, the stars do not beco me
//! brighter any more. Must be <= 60.0. //! brighter any more. Must be <= 60.0.
void setMinAdaptFov(float fov) {minAdaptFov = (fov > 60.f) ? 60.f : fov;} void setMinAdaptFov(float fov) {minAdaptFov = (fov > 60.f) ? 60.f : fov;}
//! Set the scaling applied to input luminance before they are conve rted by the StelToneReproducer //! Set the scaling applied to input luminance before they are conve rted by the StelToneReproducer
void setInputScale(double in) {inScale = in;} void setInputScale(float in) {inScale = in;}
//! Get the scaling applied to input luminance before they are conve rted by the StelToneReproducer //! Get the scaling applied to input luminance before they are conve rted by the StelToneReproducer
float getInputScale() const {return inScale;} float getInputScale() const {return inScale;}
//! Compute the luminance for a point source with the given mag for the current FOV //! Compute the luminance for a point source with the given mag for the current FOV
//! @param mag V magnitude of the point source //! @param mag V magnitude of the point source
//! @return the luminance in log(cd/m^2) //! @return the luminance in log(cd/m^2)
inline float pointSourceMagToLuminance(float mag) const {return std: :exp(pointSourceMagToLnLuminance(mag));} inline float pointSourceMagToLuminance(float mag) const {return std: :exp(pointSourceMagToLnLuminance(mag));}
//! Compute the V magnitude for a point source with the given lumina nce for the current FOV //! Compute the V magnitude for a point source with the given lumina nce for the current FOV
//! @param lum the luminance in cd/m^2 //! @param lum the luminance in cd/m^2
skipping to change at line 220 skipping to change at line 226
float findWorldLumForMag(float mag, float targetRadius); float findWorldLumForMag(float mag, float targetRadius);
StelCore* core; StelCore* core;
StelToneReproducer* eye; StelToneReproducer* eye;
float maxAdaptFov, minAdaptFov, lnfovFactor; float maxAdaptFov, minAdaptFov, lnfovFactor;
bool flagPointStar; bool flagPointStar;
bool flagStarTwinkle; bool flagStarTwinkle;
float twinkleAmount; float twinkleAmount;
//! Informing the drawer whether atmosphere is displayed.
//! This is used to avoid twinkling/simulate extinction/refraction.
bool flagHasAtmosphere;
float starRelativeScale; float starRelativeScale;
float starAbsoluteScaleF; float starAbsoluteScaleF;
float starLinearScale; // optimization variable float starLinearScale; // optimization variable
//! Current magnitude limit for point sources //! Current magnitude limit for point sources
float limitMagnitude; float limitMagnitude;
//! Current magnitude luminance //! Current magnitude luminance
float limitLuminance; float limitLuminance;
skipping to change at line 244 skipping to change at line 254
//! Load B-V conversion parameters from config file //! Load B-V conversion parameters from config file
void initColorTableFromConfigFile(class QSettings* conf); void initColorTableFromConfigFile(class QSettings* conf);
//! Contains the list of colors matching a given B-V index //! Contains the list of colors matching a given B-V index
static Vec3f colorTable[128]; static Vec3f colorTable[128];
//! The current Bortle Scale index //! The current Bortle Scale index
int bortleScaleIndex; int bortleScaleIndex;
//! The scaling applied to input luminance before they are converted by the StelToneReproducer //! The scaling applied to input luminance before they are converted by the StelToneReproducer
double inScale; float inScale;
// Variables used for GL optimization when displaying point sources // Variables used for GL optimization when displaying point sources
//! Buffer for storing the vertex array data //! Buffer for storing the vertex array data
Vec2f* verticesGrid; Vec2f* verticesGrid;
//! Buffer for storing the color array data //! Buffer for storing the color array data
Vec3f* colorGrid; Vec3f* colorGrid;
//! Buffer for storing the texture coordinate array data //! Buffer for storing the texture coordinate array data
Vec2f* textureGrid; Vec2f* textureGrid;
//! Current number of sources stored in the buffers (still to displa y) //! Current number of sources stored in the buffers (still to displa y)
unsigned int nbPointSources; unsigned int nbPointSources;
 End of changes. 17 change blocks. 
12 lines changed or deleted 22 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/