LandscapeMgr.cpp   LandscapeMgr.cpp 
skipping to change at line 243 skipping to change at line 243
// qDebug() << "Adapted Atmosphere lum=" << eye->adaptLuminance(atmosph ere->getAverageLuminance()) << " Adapted ground lum=" << eye->adaptLuminanc e(groundLuminance); // qDebug() << "Adapted Atmosphere lum=" << eye->adaptLuminance(atmosph ere->getAverageLuminance()) << " Adapted ground lum=" << eye->adaptLuminanc e(groundLuminance);
// compute global ground brightness in a simplistic way, directly in RGB // compute global ground brightness in a simplistic way, directly in RGB
float landscapeBrightness = 0; float landscapeBrightness = 0;
sunPos.normalize(); sunPos.normalize();
moonPos.normalize(); moonPos.normalize();
// We define the brigthness zero when the sun is 8 degrees below the horizon. // We define the brigthness zero when the sun is 8 degrees below the horizon.
float sinSunAngleRad = sin(qMin(M_PI_2, asin(sunPos[2])+8.*M_PI/180. )); float sinSunAngleRad = sin(qMin(M_PI_2, asin(sunPos[2])+8.*M_PI/180. ));
float initBrightness = getInitialLandscapeBrightness(); float initBrightness = getInitialLandscapeBrightness();
// Setting for landscapes has priority if it enabled
if (landscape->getLandscapeNightBrightness()>0 && getFlagLandscapeNi
ghtBrightness())
initBrightness = landscape->getLandscapeNightBrightness();
if(sinSunAngleRad < -0.1/1.5 ) if(sinSunAngleRad < -0.1/1.5 )
landscapeBrightness = initBrightness; landscapeBrightness = initBrightness;
else else
landscapeBrightness = (initBrightness + 1.5*(sinSunAngleRad+ 0.1/1.5)); landscapeBrightness = (initBrightness + 1.5*(sinSunAngleRad+ 0.1/1.5));
if (moonPos[2] > -0.1/1.5) if (moonPos[2] > -0.1/1.5)
landscapeBrightness += qMax(0.2/-12.*ssystem->getMoon()->get VMagnitude(core, true),0.)*moonPos[2]; landscapeBrightness += qMax(0.2/-12.*ssystem->getMoon()->get VMagnitude(core, true),0.)*moonPos[2];
// TODO make this more generic for non-atmosphere planets // TODO make this more generic for non-atmosphere planets
if(atmosphere->getFadeIntensity() == 1) if(atmosphere->getFadeIntensity() == 1)
skipping to change at line 305 skipping to change at line 308
setFlagFog(conf->value("landscape/flag_fog",true).toBool()); setFlagFog(conf->value("landscape/flag_fog",true).toBool());
setFlagAtmosphere(conf->value("landscape/flag_atmosphere", true).toB ool()); setFlagAtmosphere(conf->value("landscape/flag_atmosphere", true).toB ool());
setAtmosphereFadeDuration(conf->value("landscape/atmosphere_fade_dur ation",0.5).toFloat()); setAtmosphereFadeDuration(conf->value("landscape/atmosphere_fade_dur ation",0.5).toFloat());
setAtmosphereLightPollutionLuminance(conf->value("viewing/light_poll ution_luminance",0.0).toFloat()); setAtmosphereLightPollutionLuminance(conf->value("viewing/light_poll ution_luminance",0.0).toFloat());
cardinalsPoints = new Cardinals(); cardinalsPoints = new Cardinals();
cardinalsPoints->setFlagShow(conf->value("viewing/flag_cardinal_poin ts",true).toBool()); cardinalsPoints->setFlagShow(conf->value("viewing/flag_cardinal_poin ts",true).toBool());
setFlagLandscapeSetsLocation(conf->value("landscape/flag_landscape_s ets_location",false).toBool()); setFlagLandscapeSetsLocation(conf->value("landscape/flag_landscape_s ets_location",false).toBool());
setFlagLandscapeAutoSelection(conf->value("viewing/flag_landscape_au toselection", false).toBool()); setFlagLandscapeAutoSelection(conf->value("viewing/flag_landscape_au toselection", false).toBool());
// Set initial brightness for landscape. This feature has been added for folks which say "landscape is super dark, please add light". --AW // Set initial brightness for landscape. This feature has been added for folks which say "landscape is super dark, please add light". --AW
setInitialLandscapeBrightness(conf->value("landscape/initial_brightn ess", 0.01).toFloat()); setInitialLandscapeBrightness(conf->value("landscape/initial_brightn ess", 0.01).toFloat());
setFlagLandscapeNightBrightness(conf->value("landscape/flag_brightne ss",false).toBool());
bool ok =true; bool ok =true;
setAtmosphereBortleLightPollution(conf->value("stars/init_bortle_sca le",3).toInt(&ok)); setAtmosphereBortleLightPollution(conf->value("stars/init_bortle_sca le",3).toInt(&ok));
if (!ok) if (!ok)
{ {
conf->setValue("stars/init_bortle_scale",3); conf->setValue("stars/init_bortle_scale",3);
setAtmosphereBortleLightPollution(3); setAtmosphereBortleLightPollution(3);
ok = true; ok = true;
} }
StelApp *app = &StelApp::getInstance(); StelApp *app = &StelApp::getInstance();
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 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/