SolarSystem.cpp   SolarSystem.cpp 
skipping to change at line 715 skipping to change at line 715
if (posfunc==NULL) if (posfunc==NULL)
{ {
qWarning() << "ERROR : can't find posfunc " << funcN ame << " for " << englishName; qWarning() << "ERROR : can't find posfunc " << funcN ame << " for " << englishName;
exit(-1); exit(-1);
} }
// Create the Solar System body and add it to the list // Create the Solar System body and add it to the list
QString type = pd.value(secname+"/type").toString(); QString type = pd.value(secname+"/type").toString();
PlanetP p; PlanetP p;
if (type == "asteroid") // New class objects, named "plutoid", has properties simila
r asteroids and we should calculate their
// positions like for asteroids. Plutoids having one excepti
on - Pluto - we should use special
// function for calculation of orbit of Pluto.
if ((type == "asteroid" || type == "plutoid") && !englishNam
e.contains("Pluto"))
{ {
p = PlanetP(new MinorPlanet(englishName, p = PlanetP(new MinorPlanet(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 (),
posfunc, posfunc,
userDataPtr, userDataPtr,
skipping to change at line 1031 skipping to change at line 1034
allTrails->setOpacity(trailFader.getInterstate()); allTrails->setOpacity(trailFader.getInterstate());
allTrails->draw(core, renderer); allTrails->draw(core, renderer);
} }
// Make some voodoo to determine when labels should be displayed // Make some voodoo to determine when labels should be displayed
float maxMagLabel = (core->getSkyDrawer()->getLimitMagnitude()<5.f ? core->getSkyDrawer()->getLimitMagnitude() : float maxMagLabel = (core->getSkyDrawer()->getLimitMagnitude()<5.f ? core->getSkyDrawer()->getLimitMagnitude() :
5.f+(core->getSkyDrawer()->getLimitMagnitude()-5.f)* 1.2f) +(labelsAmount-3.f)*1.2f; 5.f+(core->getSkyDrawer()->getLimitMagnitude()-5.f)* 1.2f) +(labelsAmount-3.f)*1.2f;
sharedPlanetGraphics.lazyInit(renderer); sharedPlanetGraphics.lazyInit(renderer);
if(StelApp::getInstance().getRenderSolarShadows() && sharedPlanetGra phics.shadowPlanetShader) if(StelApp::getInstance().getRenderSolarShadows() && sharedPlanetGra phics.shadowPlanetShader && renderer->areFloatTexturesSupported())
{ {
StelTextureNew* shadowInfo = computeShadowInfo(renderer); StelTextureNew* shadowInfo = computeShadowInfo(renderer);
sharedPlanetGraphics.planetShader = sharedPlanetGraphics.sha dowPlanetShader; sharedPlanetGraphics.planetShader = sharedPlanetGraphics.sha dowPlanetShader;
sharedPlanetGraphics.info.info = 1; sharedPlanetGraphics.info.info = 1;
sharedPlanetGraphics.info.infoCount = shadowPlanetCount; sharedPlanetGraphics.info.infoCount = shadowPlanetCount;
const QSize size = shadowInfo->getDimensions(); const QSize size = shadowInfo->getDimensions();
Q_ASSERT_X(size.width() == size.height(), Q_FUNC_INFO, Q_ASSERT_X(size.width() == size.height(), Q_FUNC_INFO,
"Shadow info texture is not square"); "Shadow info texture is not square");
sharedPlanetGraphics.info.infoSize = size.width(); sharedPlanetGraphics.info.infoSize = size.width();
skipping to change at line 1383 skipping to change at line 1386
if (constw==objw) if (constw==objw)
{ {
result << p->getNameI18n(); result << p->getNameI18n();
if (result.size()==maxNbItem) if (result.size()==maxNbItem)
return result; return result;
} }
} }
return result; return result;
} }
//! Find and return the list of at most maxNbItem objects auto-completing t
he passed object English name
QStringList SolarSystem::listMatchingObjects(const QString& objPrefix, int
maxNbItem) const
{
QStringList result;
if (maxNbItem==0)
return result;
QString objw = objPrefix.toUpper();
foreach (const PlanetP& p, systemPlanets)
{
QString constw = p->getEnglishName().mid(0, objw.size()).toU
pper();
if (constw==objw)
{
result << p->getEnglishName();
if (result.size()==maxNbItem)
return result;
}
}
return result;
}
QStringList SolarSystem::listAllObjects(bool inEnglish) const QStringList SolarSystem::listAllObjects(bool inEnglish) const
{ {
QStringList result; QStringList result;
if (inEnglish) if (inEnglish)
{ {
foreach(const PlanetP& p, systemPlanets) foreach(const PlanetP& p, systemPlanets)
{ {
result << p->getEnglishName(); result << p->getEnglishName();
} }
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 31 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/