StelSkyDrawer.cpp   StelSkyDrawer.cpp 
skipping to change at line 69 skipping to change at line 69
limitMagnitude(-100.f), limitMagnitude(-100.f),
limitLuminance(0.f), limitLuminance(0.f),
bortleScaleIndex(3), bortleScaleIndex(3),
inScale(1.f), inScale(1.f),
starShaderProgram(NULL), starShaderProgram(NULL),
starShaderVars(StarShaderVars()), starShaderVars(StarShaderVars()),
maxLum(0.f), maxLum(0.f),
oldLum(-1.f), oldLum(-1.f),
big3dModelHaloRadius(150.f) big3dModelHaloRadius(150.f)
{ {
qsrand (QDateTime::currentMSecsSinceEpoch());
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
initColorTableFromConfigFile(conf); initColorTableFromConfigFile(conf);
setFlagHasAtmosphere(conf->value("landscape/flag_atmosphere", true). toBool()); setFlagHasAtmosphere(conf->value("landscape/flag_atmosphere", true). toBool());
setTwinkleAmount(conf->value("stars/star_twinkle_amount",0.3).toFloa t()); setTwinkleAmount(conf->value("stars/star_twinkle_amount",0.3).toFloa t());
setFlagTwinkle(conf->value("stars/flag_star_twinkle",true).toBool()) ; setFlagTwinkle(conf->value("stars/flag_star_twinkle",true).toBool()) ;
setMaxAdaptFov(conf->value("stars/mag_converter_max_fov",70.0).toFlo at()); setMaxAdaptFov(conf->value("stars/mag_converter_max_fov",70.0).toFlo at());
setMinAdaptFov(conf->value("stars/mag_converter_min_fov",0.1).toFloa t()); setMinAdaptFov(conf->value("stars/mag_converter_min_fov",0.1).toFloa t());
setFlagLuminanceAdaptation(conf->value("viewing/use_luminance_adapta tion",true).toBool()); setFlagLuminanceAdaptation(conf->value("viewing/use_luminance_adapta tion",true).toBool());
setFlagStarMagnitudeLimit((conf->value("astro/flag_star_magnitude_li mit", false).toBool())); setFlagStarMagnitudeLimit((conf->value("astro/flag_star_magnitude_li mit", false).toBool()));
skipping to change at line 420 skipping to change at line 421
} }
// Draw a point source halo. // Draw a point source halo.
bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3f& v, const RCMag& rcMag, const Vec3f& color, bool checkInScreen) bool StelSkyDrawer::drawPointSource(StelPainter* sPainter, const Vec3f& v, const RCMag& rcMag, const Vec3f& color, bool checkInScreen)
{ {
Q_ASSERT(sPainter); Q_ASSERT(sPainter);
if (rcMag.radius<=0.f) if (rcMag.radius<=0.f)
return false; return false;
Vec3f win; Vec3d win;
if (!(checkInScreen ? sPainter->getProjector()->projectCheck(v, win) if (!(checkInScreen ? sPainter->getProjector()->projectCheck(Vec3d(v
: sPainter->getProjector()->project(v, win))) [0],v[1],v[2]), win) : sPainter->getProjector()->project(Vec3d(v[0],v[1],v[
2]), win)))
return false; return false;
const float radius = rcMag.radius; const float radius = rcMag.radius;
// Random coef for star twinkling // Random coef for star twinkling
const float tw = (flagStarTwinkle && flagHasAtmosphere) ? (1.f-twink leAmount*rand()/RAND_MAX)*rcMag.luminance : rcMag.luminance; const float tw = (flagStarTwinkle && flagHasAtmosphere) ? (1.f-twink leAmount*qrand()/RAND_MAX)*rcMag.luminance : rcMag.luminance;
// If the rmag is big, draw a big halo // If the rmag is big, draw a big halo
if (radius>MAX_LINEAR_RADIUS+5.f) if (radius>MAX_LINEAR_RADIUS+5.f)
{ {
float cmag = qMin(rcMag.luminance,(float)(radius-(MAX_LINEAR _RADIUS+5.f))/30.f); float cmag = qMin(rcMag.luminance,(float)(radius-(MAX_LINEAR _RADIUS+5.f))/30.f);
float rmag = 150.f; float rmag = 150.f;
if (cmag>1.f) if (cmag>1.f)
cmag = 1.f; cmag = 1.f;
texBigHalo->bind(); texBigHalo->bind();
 End of changes. 3 change blocks. 
4 lines changed or deleted 6 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/