SolarSystem.cpp   SolarSystem.cpp 
skipping to change at line 173 skipping to change at line 173
{ {
const StelObjectP obj = newSelected[0]; const StelObjectP obj = newSelected[0];
Vec3d pos=obj->getJ2000EquatorialPos(core); Vec3d pos=obj->getJ2000EquatorialPos(core);
Vec3d screenpos; Vec3d screenpos;
// Compute 2D pos and return if outside screen // Compute 2D pos and return if outside screen
if (!prj->project(pos, screenpos)) if (!prj->project(pos, screenpos))
return; return;
StelPainter sPainter(prj); StelPainter sPainter(prj);
sPainter.setColor(1.0f,0.3f,0.3f); if (StelApp::getInstance().getVisionModeNight())
sPainter.setColor(1.0f,0.0f,0.0f);
else
sPainter.setColor(1.0f,0.3f,0.3f);
float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter()*2.; float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter()*2.;
size+=40.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime()); size+=40.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime());
texPointer->bind(); texPointer->bind();
sPainter.enableTexture2d(true); sPainter.enableTexture2d(true);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
skipping to change at line 744 skipping to change at line 747
if (slope >= 0 && slope <= 1) if (slope >= 0 && slope <= 1)
{ {
mp->setAbsoluteMagnitudeAndSlope(mag nitude, slope); mp->setAbsoluteMagnitudeAndSlope(mag nitude, slope);
} }
else else
{ {
mp->setAbsoluteMagnitudeAndSlope(mag nitude, 0.15); mp->setAbsoluteMagnitudeAndSlope(mag nitude, 0.15);
} }
} }
mp->setSemiMajorAxis(pd.value(secname+"/orbit_SemiMa
jorAxis", 0).toDouble());
} }
else if (type == "comet") else if (type == "comet")
{ {
p = PlanetP(new Comet(englishName, p = PlanetP(new Comet(englishName,
pd.value(secname+"/lighting").toBool( ), pd.value(secname+"/lighting").toBool( ),
pd.value(secname+"/radius").toDouble( )/AU, pd.value(secname+"/radius").toDouble( )/AU,
pd.value(secname+"/oblateness", 0.0). toDouble(), pd.value(secname+"/oblateness", 0.0). toDouble(),
StelUtils::strToVec3f(pd.value(secnam e+"/color").toString()), StelUtils::strToVec3f(pd.value(secnam e+"/color").toString()),
pd.value(secname+"/albedo").toFloat() , pd.value(secname+"/albedo").toFloat() ,
pd.value(secname+"/tex_map").toString (), pd.value(secname+"/tex_map").toString (),
skipping to change at line 1002 skipping to change at line 1007
StelObjectP SolarSystem::searchByName(const QString& name) const StelObjectP SolarSystem::searchByName(const QString& name) const
{ {
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
if (p->getEnglishName() == name) if (p->getEnglishName() == name)
return qSharedPointerCast<StelObject>(p); return qSharedPointerCast<StelObject>(p);
} }
return StelObjectP(); return StelObjectP();
} }
float SolarSystem::getPlanetVMagnitude(QString planetName, bool withExtinct
ion) const
{
PlanetP p = searchByEnglishName(planetName);
float r = 0.f;
r = p->getVMagnitude(StelApp::getInstance().getCore(), withExtinctio
n);
return r;
}
// Search if any Planet is close to position given in earth equatorial posi tion and return the distance // Search if any Planet is close to position given in earth equatorial posi tion and return the distance
StelObjectP SolarSystem::search(Vec3d pos, const StelCore* core) const StelObjectP SolarSystem::search(Vec3d pos, const StelCore* core) const
{ {
pos.normalize(); pos.normalize();
PlanetP closest; PlanetP closest;
double cos_angle_closest = 0.; double cos_angle_closest = 0.;
Vec3d equPos; Vec3d equPos;
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
 End of changes. 3 change blocks. 
1 lines changed or deleted 17 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/