Planet.cpp   Planet.cpp 
skipping to change at line 74 skipping to change at line 74
float albedo, float albedo,
const QString& atexMapName, const QString& atexMapName,
const QString& anormalMapName, const QString& anormalMapName,
posFuncType coordFunc, posFuncType coordFunc,
void* auserDataPtr, void* auserDataPtr,
OsculatingFunctType *osculatingFunc, OsculatingFunctType *osculatingFunc,
bool acloseOrbit, bool acloseOrbit,
bool hidden, bool hidden,
bool hasAtmosphere, bool hasAtmosphere,
bool hasHalo, bool hasHalo,
const QString& pType) const QString& pTypeStr)
: englishName(englishName), : englishName(englishName),
flagLighting(flagLighting), flagLighting(flagLighting),
radius(radius), radius(radius),
oneMinusOblateness(1.0-oblateness), oneMinusOblateness(1.0-oblateness),
color(color), color(color),
albedo(albedo), albedo(albedo),
axisRotation(0.), axisRotation(0.),
rings(NULL), rings(NULL),
sphereScale(1.f), sphereScale(1.f),
lastJD(J2000), lastJD(J2000),
coordFunc(coordFunc), coordFunc(coordFunc),
userDataPtr(auserDataPtr), userDataPtr(auserDataPtr),
osculatingFunc(osculatingFunc), osculatingFunc(osculatingFunc),
parent(NULL), parent(NULL),
hidden(hidden), hidden(hidden),
atmosphere(hasAtmosphere), atmosphere(hasAtmosphere),
halo(hasHalo), halo(hasHalo)
pType(pType)
{ {
texMapName = atexMapName; texMapName = atexMapName;
normalMapName = anormalMapName; normalMapName = anormalMapName;
lastOrbitJD =0; lastOrbitJD =0;
deltaJD = StelCore::JD_SECOND; deltaJD = StelCore::JD_SECOND;
orbitCached = 0; orbitCached = 0;
closeOrbit = acloseOrbit; closeOrbit = acloseOrbit;
deltaOrbitJD = 0; deltaOrbitJD = 0;
distance = 0; distance = 0;
// Initialize pType with the key found in pTypeMap, or mark planet t
ype as undefined.
// The latter condition should obviously never happen.
pType=pTypeMap.key(pTypeStr, Planet::isUNDEFINED);
eclipticPos=Vec3d(0.,0.,0.); eclipticPos=Vec3d(0.,0.,0.);
rotLocalToParent = Mat4d::identity(); rotLocalToParent = Mat4d::identity();
texMap = StelApp::getInstance().getTextureManager().createTextureThr ead(StelFileMgr::getInstallationDir()+"/textures/"+texMapName, StelTexture: :StelTextureParams(true, GL_LINEAR, GL_REPEAT)); texMap = StelApp::getInstance().getTextureManager().createTextureThr ead(StelFileMgr::getInstallationDir()+"/textures/"+texMapName, StelTexture: :StelTextureParams(true, GL_LINEAR, GL_REPEAT));
normalMap = StelApp::getInstance().getTextureManager().createTexture Thread(StelFileMgr::getInstallationDir()+"/textures/"+normalMapName, StelTe xture::StelTextureParams(true, GL_LINEAR, GL_REPEAT)); normalMap = StelApp::getInstance().getTextureManager().createTexture Thread(StelFileMgr::getInstallationDir()+"/textures/"+normalMapName, StelTe xture::StelTextureParams(true, GL_LINEAR, GL_REPEAT));
nameI18 = englishName; nameI18 = englishName;
if (englishName!="Pluto") if (englishName!="Pluto")
{ {
deltaJD = 0.001*StelCore::JD_SECOND; deltaJD = 0.001*StelCore::JD_SECOND;
} }
flagLabels = true; flagLabels = true;
} }
QMap<Planet::PlanetType, QString> Planet::pTypeMap;
// called in SolarSystem::init() before first planet is created. Loads pTyp
eMap.
void Planet::init()
{
if (pTypeMap.count() > 0 )
{
// This should never happen. But it's uncritical.
qDebug() << "Planet::init(): Non-empty static map. This is a
programming error, but we can fix that.";
pTypeMap.clear();
}
pTypeMap.insert(Planet::isStar, "star");
pTypeMap.insert(Planet::isPlanet, "planet");
pTypeMap.insert(Planet::isMoon, "moon");
pTypeMap.insert(Planet::isAsteroid, "asteroid");
pTypeMap.insert(Planet::isPlutoid, "plutoid");
pTypeMap.insert(Planet::isComet, "comet");
pTypeMap.insert(Planet::isUNDEFINED, "UNDEFINED"); // something must
be broken before we ever see this!
}
Planet::~Planet() Planet::~Planet()
{ {
if (rings) if (rings)
delete rings; delete rings;
} }
void Planet::translateName(const StelTranslator& trans) void Planet::translateName(const StelTranslator& trans)
{ {
nameI18 = trans.qtranslate(englishName); nameI18 = trans.qtranslate(englishName);
} }
skipping to change at line 145 skipping to change at line 168
oss << "<h2>" << q_(englishName); // UI translation can dif fer from sky translation oss << "<h2>" << q_(englishName); // UI translation can dif fer from sky translation
oss.setRealNumberNotation(QTextStream::FixedNotation); oss.setRealNumberNotation(QTextStream::FixedNotation);
oss.setRealNumberPrecision(1); oss.setRealNumberPrecision(1);
if (sphereScale != 1.f) if (sphereScale != 1.f)
oss << QString::fromUtf8(" (\xC3\x97") << sphereScal e << ")"; oss << QString::fromUtf8(" (\xC3\x97") << sphereScal e << ")";
oss << "</h2>"; oss << "</h2>";
} }
if (flags&ObjectType) if (flags&ObjectType)
{ {
if (pType.length()>0) oss << q_("Type: <b>%1</b>").arg(q_(getPlanetTypeString()))
oss << q_("Type: <b>%1</b>").arg(q_(pType)) << "<br << "<br />";
/>";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere()) if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b> )").arg(QString::number(getVMagnitude(core), 'f', 2), oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b> )").arg(QString::number(getVMagnitude(core), 'f', 2),
QString::number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br >"; QString::number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br >";
else else
oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude(core ), 0, 'f', 2) << "<br>"; oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude(core ), 0, 'f', 2) << "<br>";
} }
skipping to change at line 314 skipping to change at line 336
deltaOrbitJD = re.siderealPeriod/ORBIT_SEGMENTS; deltaOrbitJD = re.siderealPeriod/ORBIT_SEGMENTS;
} }
Vec3d Planet::getJ2000EquatorialPos(const StelCore *core) const Vec3d Planet::getJ2000EquatorialPos(const StelCore *core) const
{ {
return StelCore::matVsop87ToJ2000.multiplyWithoutTranslation(getHeli ocentricEclipticPos() - core->getObserverHeliocentricEclipticPos()); return StelCore::matVsop87ToJ2000.multiplyWithoutTranslation(getHeli ocentricEclipticPos() - core->getObserverHeliocentricEclipticPos());
} }
// Compute the position in the parent Planet coordinate system // Compute the position in the parent Planet coordinate system
// Actually call the provided function to compute the ecliptical position // Actually call the provided function to compute the ecliptical position
void Planet::computePositionWithoutOrbits(const double date) void Planet::computePositionWithoutOrbits(const double dateJD)
{ {
if (fabs(lastJD-date)>deltaJD) if (fabs(lastJD-dateJD)>deltaJD)
{ {
coordFunc(date, eclipticPos, userDataPtr); coordFunc(dateJD, eclipticPos, userDataPtr);
lastJD = date; lastJD = dateJD;
} }
} }
double Planet::getRotObliquity(double JDay) const double Planet::getRotObliquity(double JDay) const
{ {
// JDay=2451545.0 for J2000.0 // JDay=2451545.0 for J2000.0
if (englishName=="Earth") if (englishName=="Earth")
return get_mean_ecliptical_obliquity(JDay) *M_PI/180.0; return get_mean_ecliptical_obliquity(JDay) *M_PI/180.0;
else else
return re.obliquity; return re.obliquity;
skipping to change at line 375 skipping to change at line 397
{ {
if (willCastShadow(this, planet.data())) if (willCastShadow(this, planet.data()))
res.append(planet.data()); res.append(planet.data());
} }
if (willCastShadow(this, parent.data())) if (willCastShadow(this, parent.data()))
res.append(parent.data()); res.append(parent.data());
return res; return res;
} }
void Planet::computePosition(const double date) void Planet::computePosition(const double dateJD)
{ {
if (orbitFader.getInterstate()>0.000001 && deltaOrbitJD > 0 && (fabs (lastOrbitJD-date)>deltaOrbitJD || !orbitCached)) if (orbitFader.getInterstate()>0.000001 && deltaOrbitJD > 0 && (fabs (lastOrbitJD-dateJD)>deltaOrbitJD || !orbitCached))
{ {
double calc_date; double calc_date;
// int delta_points = (int)(0.5 + (date - lastOrbitJD)/date_ increment); // int delta_points = (int)(0.5 + (date - lastOrbitJD)/date_ increment);
int delta_points; int delta_points;
if( date > lastOrbitJD ) if( dateJD > lastOrbitJD )
{ {
delta_points = (int)(0.5 + (date - lastOrbitJD)/delt aOrbitJD); delta_points = (int)(0.5 + (dateJD - lastOrbitJD)/de ltaOrbitJD);
} }
else else
{ {
delta_points = (int)(-0.5 + (date - lastOrbitJD)/del taOrbitJD); delta_points = (int)(-0.5 + (dateJD - lastOrbitJD)/d eltaOrbitJD);
} }
double new_date = lastOrbitJD + delta_points*deltaOrbitJD; double new_date = lastOrbitJD + delta_points*deltaOrbitJD;
// qDebug( "Updating orbit coordinates for %s (delta %f) (%d points)\n", name.c_str(), deltaOrbitJD, delta_points); // qDebug( "Updating orbit coordinates for %s (delta %f) (%d points)\n", name.c_str(), deltaOrbitJD, delta_points);
if( delta_points > 0 && delta_points < ORBIT_SEGMENTS && orb itCached) if( delta_points > 0 && delta_points < ORBIT_SEGMENTS && orb itCached)
{ {
for( int d=0; d<ORBIT_SEGMENTS; d++ ) for( int d=0; d<ORBIT_SEGMENTS; d++ )
{ {
if(d + delta_points >= ORBIT_SEGMENTS ) if(d + delta_points >= ORBIT_SEGMENTS )
{ {
// calculate new points // calculate new points
calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJD; calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJD;
// date increments between points wi ll not be completely constant though // date increments between points wi ll not be completely constant though
computeTransMatrix(calc_date); computeTransMatrix(calc_date);
if (osculatingFunc) if (osculatingFunc)
{ {
(*osculatingFunc)(date,calc_ date,eclipticPos); (*osculatingFunc)(dateJD,cal c_date,eclipticPos);
} }
else else
{ {
coordFunc(calc_date, eclipti cPos, userDataPtr); coordFunc(calc_date, eclipti cPos, userDataPtr);
} }
orbitP[d] = eclipticPos; orbitP[d] = eclipticPos;
orbit[d] = getHeliocentricEclipticPo s(); orbit[d] = getHeliocentricEclipticPo s();
} }
else else
{ {
skipping to change at line 440 skipping to change at line 462
for( int d=ORBIT_SEGMENTS-1; d>=0; d-- ) for( int d=ORBIT_SEGMENTS-1; d>=0; d-- )
{ {
if(d + delta_points < 0 ) if(d + delta_points < 0 )
{ {
// calculate new points // calculate new points
calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJD; calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJD;
computeTransMatrix(calc_date); computeTransMatrix(calc_date);
if (osculatingFunc) { if (osculatingFunc) {
(*osculatingFunc)(date,calc_ date,eclipticPos); (*osculatingFunc)(dateJD,cal c_date,eclipticPos);
} }
else else
{ {
coordFunc(calc_date, eclipti cPos, userDataPtr); coordFunc(calc_date, eclipti cPos, userDataPtr);
} }
orbitP[d] = eclipticPos; orbitP[d] = eclipticPos;
orbit[d] = getHeliocentricEclipticPo s(); orbit[d] = getHeliocentricEclipticPo s();
} }
else else
{ {
skipping to change at line 465 skipping to change at line 487
lastOrbitJD = new_date; lastOrbitJD = new_date;
} }
else if( delta_points || !orbitCached) else if( delta_points || !orbitCached)
{ {
// update all points (less efficient) // update all points (less efficient)
for( int d=0; d<ORBIT_SEGMENTS; d++ ) for( int d=0; d<ORBIT_SEGMENTS; d++ )
{ {
calc_date = date + (d-ORBIT_SEGMENTS/2)*delt aOrbitJD; calc_date = dateJD + (d-ORBIT_SEGMENTS/2)*de ltaOrbitJD;
computeTransMatrix(calc_date); computeTransMatrix(calc_date);
if (osculatingFunc) if (osculatingFunc)
{ {
(*osculatingFunc)(date,calc_date,ecl ipticPos); (*osculatingFunc)(dateJD,calc_date,e clipticPos);
} }
else else
{ {
coordFunc(calc_date, eclipticPos, us erDataPtr); coordFunc(calc_date, eclipticPos, us erDataPtr);
} }
orbitP[d] = eclipticPos; orbitP[d] = eclipticPos;
orbit[d] = getHeliocentricEclipticPos(); orbit[d] = getHeliocentricEclipticPos();
} }
lastOrbitJD = date; lastOrbitJD = dateJD;
if (!osculatingFunc) orbitCached = 1; if (!osculatingFunc) orbitCached = 1;
} }
// calculate actual Planet position // calculate actual Planet position
coordFunc(date, eclipticPos, userDataPtr); coordFunc(dateJD, eclipticPos, userDataPtr);
lastJD = date; lastJD = dateJD;
} }
else if (fabs(lastJD-date)>deltaJD) else if (fabs(lastJD-dateJD)>deltaJD)
{ {
// calculate actual Planet position // calculate actual Planet position
coordFunc(date, eclipticPos, userDataPtr); coordFunc(dateJD, eclipticPos, userDataPtr);
// XXX: do we need to do that even when the orbit is not vis ible? // XXX: do we need to do that even when the orbit is not vis ible?
for( int d=0; d<ORBIT_SEGMENTS; d++ ) for( int d=0; d<ORBIT_SEGMENTS; d++ )
orbit[d]=getHeliocentricPos(orbitP[d]); orbit[d]=getHeliocentricPos(orbitP[d]);
lastJD = date; lastJD = dateJD;
} }
} }
// Compute the transformation matrix from the local Planet coordinate to th e parent Planet coordinate // Compute the transformation matrix from the local Planet coordinate to th e parent Planet coordinate
void Planet::computeTransMatrix(double jd) void Planet::computeTransMatrix(double jd)
{ {
axisRotation = getSiderealTime(jd); axisRotation = getSiderealTime(jd);
// Special case - heliocentric coordinates are on ecliptic, // Special case - heliocentric coordinates are on ecliptic,
skipping to change at line 573 skipping to change at line 595
if (englishName=="Sun") if (englishName=="Sun")
return msd; return msd;
double sday = getSiderealDay(); double sday = getSiderealDay();
double coeff = std::abs(sday/getSiderealPeriod()); double coeff = std::abs(sday/getSiderealPeriod());
float sign = 1; float sign = 1;
// planets with retrograde rotation // planets with retrograde rotation
if (englishName=="Venus" || englishName=="Uranus" || englishName=="P luto") if (englishName=="Venus" || englishName=="Uranus" || englishName=="P luto")
sign = -1; sign = -1;
if (pType.contains("moon")) if (pType==Planet::isMoon)
{ {
// duration of mean solar day on moon are same as synodic mo nth on this moon // duration of mean solar day on moon are same as synodic mo nth on this moon
double a = parent->getSiderealPeriod()/sday; double a = parent->getSiderealPeriod()/sday;
msd = sday*(a/(a-1)); msd = sday*(a/(a-1));
} }
else else
msd = sign*sday/(1 - sign*coeff); msd = sign*sday/(1 - sign*coeff);
return msd; return msd;
} }
skipping to change at line 640 skipping to change at line 662
{ {
while (p->parent) while (p->parent)
{ {
eclipticPos -= p->eclipticPos; eclipticPos -= p->eclipticPos;
p = p->parent; p = p->parent;
} }
} }
} }
// Compute the distance to the given position in heliocentric coordinate (i n AU) // Compute the distance to the given position in heliocentric coordinate (i n AU)
// This is called by SolarSystem::draw()
double Planet::computeDistance(const Vec3d& obsHelioPos) double Planet::computeDistance(const Vec3d& obsHelioPos)
{ {
distance = (obsHelioPos-getHeliocentricEclipticPos()).length(); distance = (obsHelioPos-getHeliocentricEclipticPos()).length();
// GZ: improve fps by juggling updates for asteroids. They must be f
ast if close to observer, but can be slow if further away.
if (pType == Planet::isAsteroid)
deltaJD=distance*StelCore::JD_SECOND;
return distance; return distance;
} }
// Get the phase angle (radians) for an observer at pos obsPos in heliocent ric coordinates (dist in AU) // Get the phase angle (radians) for an observer at pos obsPos in heliocent ric coordinates (dist in AU)
double Planet::getPhaseAngle(const Vec3d& obsPos) const double Planet::getPhaseAngle(const Vec3d& obsPos) const
{ {
const double observerRq = obsPos.lengthSquared(); const double observerRq = obsPos.lengthSquared();
const Vec3d& planetHelioPos = getHeliocentricEclipticPos(); const Vec3d& planetHelioPos = getHeliocentricEclipticPos();
const double planetRq = planetHelioPos.lengthSquared(); const double planetRq = planetHelioPos.lengthSquared();
const double observerPlanetRq = (obsPos - planetHelioPos).lengthSqua red(); const double observerPlanetRq = (obsPos - planetHelioPos).lengthSqua red();
skipping to change at line 693 skipping to change at line 719
const double distParsec = std::sqrt(core->getObserverHelioce ntricEclipticPos().lengthSquared())*AU/PARSEC; const double distParsec = std::sqrt(core->getObserverHelioce ntricEclipticPos().lengthSquared())*AU/PARSEC;
return 4.83 + 5.*(std::log10(distParsec)-1.); return 4.83 + 5.*(std::log10(distParsec)-1.);
} }
// Compute the angular phase // Compute the angular phase
const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipti cPos(); const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipti cPos();
const double observerRq = observerHelioPos.lengthSquared(); const double observerRq = observerHelioPos.lengthSquared();
const Vec3d& planetHelioPos = getHeliocentricEclipticPos(); const Vec3d& planetHelioPos = getHeliocentricEclipticPos();
const double planetRq = planetHelioPos.lengthSquared(); const double planetRq = planetHelioPos.lengthSquared();
const double observerPlanetRq = (observerHelioPos - planetHelioPos). lengthSquared(); const double observerPlanetRq = (observerHelioPos - planetHelioPos). lengthSquared();
const double cos_chi = (observerPlanetRq + planetRq - observerRq)/(2 const double cos_chi = (observerPlanetRq + planetRq - observerRq)/(2
.0*sqrt(observerPlanetRq*planetRq)); .0*std::sqrt(observerPlanetRq*planetRq));
double phase = std::acos(cos_chi); const double phase = std::acos(cos_chi);
double shadowFactor = 1.; double shadowFactor = 1.;
// Check if the satellite is inside the inner shadow of the parent p lanet: // Check if the satellite is inside the inner shadow of the parent p lanet:
if (parent->parent != 0) if (parent->parent != 0)
{ {
const Vec3d& parentHeliopos = parent->getHeliocentricEclipti cPos(); const Vec3d& parentHeliopos = parent->getHeliocentricEclipti cPos();
const double parent_Rq = parentHeliopos.lengthSquared(); const double parent_Rq = parentHeliopos.lengthSquared();
const double pos_times_parent_pos = planetHelioPos * parentH eliopos; const double pos_times_parent_pos = planetHelioPos * parentH eliopos;
if (pos_times_parent_pos > parent_Rq) if (pos_times_parent_pos > parent_Rq)
{ {
skipping to change at line 861 skipping to change at line 887
double Planet::getSpheroidAngularSize(const StelCore* core) const double Planet::getSpheroidAngularSize(const StelCore* core) const
{ {
return std::atan2(radius*sphereScale,getJ2000EquatorialPos(core).len gth()) * 180./M_PI; return std::atan2(radius*sphereScale,getJ2000EquatorialPos(core).len gth()) * 180./M_PI;
} }
// Draw the Planet and all the related infos : name, circle etc.. // Draw the Planet and all the related infos : name, circle etc..
void Planet::draw(StelCore* core, float maxMagLabels, const QFont& planetNa meFont) void Planet::draw(StelCore* core, float maxMagLabels, const QFont& planetNa meFont)
{ {
if (hidden) if (hidden)
return; return;
// GZ: Try to improve speed for minor planets: test if visible at al
l.
// For a full catalog of NEAs (11000 objects), with this and resetti
ng deltaJD according to distance, rendering time went 4.5fps->12fps.
// AW: Apply this rule to asteroids only
// Note that taking away the asteroids at this stage breaks dim-aste
roid occultation of stars!
if (((getVMagnitude(core)-1.0f) > core->getSkyDrawer()->getLimitMagn
itude()) && pType==Planet::isAsteroid)
{
return;
}
Mat4d mat = Mat4d::translation(eclipticPos) * rotLocalToParent; Mat4d mat = Mat4d::translation(eclipticPos) * rotLocalToParent;
PlanetP p = parent; PlanetP p = parent;
while (p && p->parent) while (p && p->parent)
{ {
mat = Mat4d::translation(p->eclipticPos) * mat * p->rotLocal ToParent; mat = Mat4d::translation(p->eclipticPos) * mat * p->rotLocal ToParent;
p = p->parent; p = p->parent;
} }
// This removed totally the Planet shaking bug!!! // This removed totally the Planet shaking bug!!!
skipping to change at line 893 skipping to change at line 927
// Compute the 2D position and check if in the screen // Compute the 2D position and check if in the screen
const StelProjectorP prj = core->getProjection(transfo); const StelProjectorP prj = core->getProjection(transfo);
float screenSz = getAngularSize(core)*M_PI/180.*prj->getPixelPerRadA tCenter(); float screenSz = getAngularSize(core)*M_PI/180.*prj->getPixelPerRadA tCenter();
float viewport_left = prj->getViewportPosX(); float viewport_left = prj->getViewportPosX();
float viewport_bottom = prj->getViewportPosY(); float viewport_bottom = prj->getViewportPosY();
if (prj->project(Vec3d(0), screenPos) if (prj->project(Vec3d(0), screenPos)
&& screenPos[1]>viewport_bottom - screenSz && screenPos[1] < vie wport_bottom + prj->getViewportHeight()+screenSz && screenPos[1]>viewport_bottom - screenSz && screenPos[1] < vie wport_bottom + prj->getViewportHeight()+screenSz
&& screenPos[0]>viewport_left - screenSz && screenPos[0] < viewp ort_left + prj->getViewportWidth() + screenSz) && screenPos[0]>viewport_left - screenSz && screenPos[0] < viewp ort_left + prj->getViewportWidth() + screenSz)
{ {
// Draw the name, and the circle if it's not too close from the body it's turning around // Draw the name, and the circle if it's not too close from the body it's turning around
// this prevents name overlaping (ie for jupiter satellites) // this prevents name overlapping (e.g. for Jupiter's satell ites)
float ang_dist = 300.f*atan(getEclipticPos().length()/getEqu inoxEquatorialPos(core).length())/core->getMovementMgr()->getCurrentFov(); float ang_dist = 300.f*atan(getEclipticPos().length()/getEqu inoxEquatorialPos(core).length())/core->getMovementMgr()->getCurrentFov();
if (ang_dist==0.f) if (ang_dist==0.f)
ang_dist = 1.f; // if ang_dist == 0, the Planet is s un.. ang_dist = 1.f; // if ang_dist == 0, the Planet is s un..
// by putting here, only draw orbit if Planet is visible for clarity // by putting here, only draw orbit if Planet is visible for clarity
drawOrbit(core); // TODO - fade in here also... drawOrbit(core); // TODO - fade in here also...
if (flagLabels && ang_dist>0.25 && maxMagLabels>getVMagnitud e(core)) if (flagLabels && ang_dist>0.25 && maxMagLabels>getVMagnitud e(core))
{ {
labelsFader=true; labelsFader=true;
 End of changes. 29 change blocks. 
30 lines changed or deleted 73 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/