Nebula.cpp   Nebula.cpp 
skipping to change at line 145 skipping to change at line 145
} }
else else
{ {
if (getVMagnitude(core, false)>20.f) return 20.f; if (getVMagnitude(core, false)>20.f) return 20.f;
return getVMagnitude(core, false); return getVMagnitude(core, false);
} }
} }
Vec3f Nebula::getInfoColor(void) const Vec3f Nebula::getInfoColor(void) const
{ {
return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.6, 0.0, Vec3f col = ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getMo
0.4) : ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getModule("Nebul dule("NebulaMgr"))->getLabelsColor();
aMgr"))->getLabelsColor(); return StelApp::getInstance().getVisionModeNight() ? StelUtils::getN
ightColor(col) : col;
} }
double Nebula::getCloseViewFov(const StelCore*) const double Nebula::getCloseViewFov(const StelCore*) const
{ {
return angularSize>0 ? angularSize * 4 : 1; return angularSize>0 ? angularSize * 4 : 1;
} }
void Nebula::drawHints(StelPainter& sPainter, float maxMagHints) void Nebula::drawHints(StelPainter& sPainter, float maxMagHints)
{ {
if (mag>maxMagHints) float lim = mag;
if (lim > 50) lim = 15.f;
if (lim>maxMagHints)
return; return;
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
float lum = 1.f;//qMin(1,4.f/getOnScreenSize(core))*0.8; float lum = 1.f;//qMin(1,4.f/getOnScreenSize(core))*0.8;
sPainter.setColor(circleColor[0]*lum*hintsBrightness, circleColor[1] Vec3f col(circleColor[0]*lum*hintsBrightness, circleColor[1]*lum*hin
*lum*hintsBrightness, circleColor[2]*lum*hintsBrightness, 1); tsBrightness, circleColor[2]*lum*hintsBrightness);
if (StelApp::getInstance().getVisionModeNight())
col = StelUtils::getNightColor(col);
sPainter.setColor(col[0], col[1], col[2], 1);
if (nType == 1) if (nType == 1)
Nebula::texOpenCluster->bind(); Nebula::texOpenCluster->bind();
if (nType == 2) if (nType == 2)
Nebula::texGlobularCluster->bind(); Nebula::texGlobularCluster->bind();
if (nType == 4) if (nType == 4)
Nebula::texPlanetNebula->bind(); Nebula::texPlanetNebula->bind();
if (nType != 1 && nType != 2 && nType != 4) if (nType != 1 && nType != 2 && nType != 4)
Nebula::texCircle->bind(); Nebula::texCircle->bind();
sPainter.drawSprite2dMode(XY[0], XY[1], 6); sPainter.drawSprite2dMode(XY[0], XY[1], 6);
} }
void Nebula::drawLabel(StelPainter& sPainter, float maxMagLabel) void Nebula::drawLabel(StelPainter& sPainter, float maxMagLabel)
{ {
if (mag>maxMagLabel) float lim = mag;
if (lim > 50) lim = 15.f;
if (lim>maxMagLabel)
return; return;
sPainter.setColor(labelColor[0], labelColor[1], labelColor[2], hints
Brightness); Vec3f col(labelColor[0], labelColor[1], labelColor[2]);
if (StelApp::getInstance().getVisionModeNight())
col = StelUtils::getNightColor(col);
sPainter.setColor(col[0], col[1], col[2], hintsBrightness);
float size = getAngularSize(NULL)*M_PI/180.*sPainter.getProjector()- >getPixelPerRadAtCenter(); float size = getAngularSize(NULL)*M_PI/180.*sPainter.getProjector()- >getPixelPerRadAtCenter();
float shift = 4.f + size/1.8f; float shift = 4.f + size/1.8f;
QString str; QString str;
if (nameI18!="") if (nameI18!="")
str = getNameI18n(); str = getNameI18n();
else else
{ {
if (M_nb > 0) if (M_nb > 0)
str = QString("M %1").arg(M_nb); str = QString("M %1").arg(M_nb);
else if (NGC_nb > 0) else if (NGC_nb > 0)
 End of changes. 5 change blocks. 
9 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/