20 #ifndef _STELSKYDRAWER_HPP_
21 #define _STELSKYDRAWER_HPP_
24 #include "VecMath.hpp"
25 #include "RefractionExtinction.hpp"
27 #include "renderer/StelIndexBuffer.hpp"
28 #include "renderer/StelVertexBuffer.hpp"
53 void update(
double deltaTime);
76 bool checkInScreen,
Vec3f& outWindowCoordinates)
79 if (rcMag[0] <= 0.0f){
return false;}
80 return checkInScreen ? projector->
projectCheck(v, outWindowCoordinates)
81 : projector->
project(v, outWindowCoordinates);
149 return (
float)bV*(4.f/127.f)-0.5f;
155 return colorTable[bV];
263 float reverseComputeRCMag(
float rmag)
const;
266 float computeLimitMagnitude()
const;
269 float computeLimitLuminance()
const;
272 float getMaxAdaptFov(
void)
const {
return maxAdaptFov;}
277 void setMaxAdaptFov(
float fov) {maxAdaptFov = (fov < 60.f) ? 60.f : fov;}
280 float getMinAdaptFov(
void)
const {
return minAdaptFov;}
285 void setMinAdaptFov(
float fov) {minAdaptFov = (fov > 60.f) ? 60.f : fov;}
288 void setInputScale(
float in) {inScale = in;}
290 float getInputScale()
const {
return inScale;}
295 inline float pointSourceMagToLuminance(
float mag)
const {
return std::exp(pointSourceMagToLnLuminance(mag));}
300 float pointSourceLuminanceToMag(
float lum);
305 float pointSourceMagToLnLuminance(
float mag)
const;
309 float findWorldLumForMag(
float mag,
float targetRadius);
320 float maxAdaptFov, minAdaptFov, lnfovFactor;
321 bool drawStarsAsPoints;
322 bool flagStarTwinkle;
327 bool flagHasAtmosphere;
331 bool flagStarMagnitudeLimit;
334 bool flagNebulaMagnitudeLimit;
336 float starRelativeScale;
337 float starAbsoluteScaleF;
339 float starLinearScale;
342 float limitMagnitude;
345 float limitLuminance;
351 float customStarMagLimit;
357 float customNebulaMagLimit;
363 void initColorTableFromConfigFile(
class QSettings* conf);
366 static Vec3f colorTable[128];
369 int bortleScaleIndex;
379 ColoredVertex(
Vec2f position,
Vec3f color):position(position), color(color){}
385 struct ColoredTexturedVertex
391 :position(position), color(color), texCoord(texCoord){}
424 bool flagLuminanceAdaptation;
426 float big3dModelHaloRadius;
430 bool statisticsInitialized;
440 #endif // _STELSKYDRAWER_HPP_