Planet.cpp   Planet.cpp 
skipping to change at line 52 skipping to change at line 52
#include <limits> #include <limits>
#include <QTextStream> #include <QTextStream>
#include <QString> #include <QString>
#include <QDebug> #include <QDebug>
#include <QVarLengthArray> #include <QVarLengthArray>
#include <QOpenGLContext> #include <QOpenGLContext>
#include <QOpenGLShader> #include <QOpenGLShader>
Vec3f Planet::labelColor = Vec3f(0.4f,0.4f,0.8f); Vec3f Planet::labelColor = Vec3f(0.4f,0.4f,0.8f);
Vec3f Planet::orbitColor = Vec3f(1.0f,0.6f,1.0f); Vec3f Planet::orbitColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitMajorPlanetsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitMoonsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitMinorPlanetsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitDwarfPlanetsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitCubewanosColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitPlutinosColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitScatteredDiscObjectsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitOortCloudObjectsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitCometsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitMercuryColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitVenusColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitEarthColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitMarsColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitJupiterColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitSaturnColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitUranusColor = Vec3f(1.0f,0.6f,1.0f);
Vec3f Planet::orbitNeptuneColor = Vec3f(1.0f,0.6f,1.0f);
StelTextureSP Planet::hintCircleTex; StelTextureSP Planet::hintCircleTex;
StelTextureSP Planet::texEarthShadow; StelTextureSP Planet::texEarthShadow;
bool Planet::permanentDrawingOrbits = false; bool Planet::permanentDrawingOrbits = false;
Planet::PlanetOrbitColorStyle Planet::orbitColorStyle = Planet::ocsOneColor ;
bool Planet::flagCustomGrsSettings = false; bool Planet::flagCustomGrsSettings = false;
double Planet::customGrsJD = 2456901.5; double Planet::customGrsJD = 2456901.5;
double Planet::customGrsDrift = 15.; double Planet::customGrsDrift = 15.;
int Planet::customGrsLongitude = 216; int Planet::customGrsLongitude = 216;
QOpenGLShaderProgram* Planet::planetShaderProgram=NULL; QOpenGLShaderProgram* Planet::planetShaderProgram=NULL;
Planet::PlanetShaderVars Planet::planetShaderVars; Planet::PlanetShaderVars Planet::planetShaderVars;
QOpenGLShaderProgram* Planet::ringPlanetShaderProgram=NULL; QOpenGLShaderProgram* Planet::ringPlanetShaderProgram=NULL;
Planet::RingPlanetShaderVars Planet::ringPlanetShaderVars; Planet::RingPlanetShaderVars Planet::ringPlanetShaderVars;
skipping to change at line 88 skipping to change at line 106
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& pTypeStr) const QString& pTypeStr)
: englishName(englishName), : flagNativeName(true),
flagTranslatedName(true),
lastOrbitJDE(0.0),
deltaJDE(StelCore::JD_SECOND),
deltaOrbitJDE(0.0),
orbitCached(false),
closeOrbit(acloseOrbit),
englishName(englishName),
nameI18(englishName),
nativeName(""),
texMapName(atexMapName),
normalMapName(anormalMapName),
flagLighting(flagLighting), flagLighting(flagLighting),
radius(radius), radius(radius),
oneMinusOblateness(1.0-oblateness), oneMinusOblateness(1.0-oblateness),
haloColor(halocolor), haloColor(halocolor),
albedo(albedo), albedo(albedo),
axisRotation(0.), axisRotation(0.),
rings(NULL), rings(NULL),
distance(0.0),
sphereScale(1.f), sphereScale(1.f),
lastJDE(J2000), lastJDE(J2000),
coordFunc(coordFunc), coordFunc(coordFunc),
userDataPtr(auserDataPtr), userDataPtr(auserDataPtr),
osculatingFunc(osculatingFunc), osculatingFunc(osculatingFunc),
parent(NULL), parent(NULL),
flagLabels(true),
hidden(hidden), hidden(hidden),
atmosphere(hasAtmosphere), atmosphere(hasAtmosphere),
halo(hasHalo) halo(hasHalo)
{ {
texMapName = atexMapName;
normalMapName = anormalMapName;
lastOrbitJDE =0;
deltaJDE = StelCore::JD_SECOND;
orbitCached = 0;
closeOrbit = acloseOrbit;
deltaOrbitJDE = 0;
distance = 0;
// Initialize pType with the key found in pTypeMap, or mark planet t ype as undefined. // Initialize pType with the key found in pTypeMap, or mark planet t ype as undefined.
// The latter condition should obviously never happen. // The latter condition should obviously never happen.
pType = pTypeMap.key(pTypeStr, Planet::isUNDEFINED); pType = pTypeMap.key(pTypeStr, Planet::isUNDEFINED);
vMagAlgorithm = Planet::UndefinedAlgorithm; vMagAlgorithm = Planet::UndefinedAlgorithm;
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;
nativeName = "";
if (englishName!="Pluto") if (englishName!="Pluto")
{ {
deltaJDE = 0.001*StelCore::JD_SECOND; deltaJDE = 0.001*StelCore::JD_SECOND;
} }
flagLabels = true;
flagNativeName = true;
flagTranslatedName = true;
} }
// called in SolarSystem::init() before first planet is created. Loads pTyp eMap. // called in SolarSystem::init() before first planet is created. Loads pTyp eMap.
void Planet::init() void Planet::init()
{ {
if (pTypeMap.count() > 0 ) if (pTypeMap.count() > 0 )
{ {
// This should never happen. But it's uncritical. // 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."; qDebug() << "Planet::init(): Non-empty static map. This is a programming error, but we can fix that.";
pTypeMap.clear(); pTypeMap.clear();
skipping to change at line 306 skipping to change at line 324
oss << q_("Apparent diameter: %1, with rings : %2") oss << q_("Apparent diameter: %1, with rings : %2")
.arg(StelUtils::radToDecDegStr(withou tRings,4,false,true), .arg(StelUtils::radToDecDegStr(withou tRings,4,false,true),
StelUtils::radToDecDegStr(angula rSize,4,false,true)); StelUtils::radToDecDegStr(angula rSize,4,false,true));
else else
oss << q_("Apparent diameter: %1, with rings : %2") oss << q_("Apparent diameter: %1, with rings : %2")
.arg(StelUtils::radToDmsStr(withoutRi ngs, true), .arg(StelUtils::radToDmsStr(withoutRi ngs, true),
StelUtils::radToDmsStr(angularSi ze, true)); StelUtils::radToDmsStr(angularSi ze, true));
} }
else else
{ {
if (withDecimalDegree) if (sphereScale!=1.f) // We must give correct diamet
oss << q_("Apparent diameter: %1").arg(StelU ers even if upscaling (e.g. Moon)
tils::radToDecDegStr(angularSize,5,false,true)); {
if (withDecimalDegree)
oss << q_("Apparent diameter: %1, sc
aled up to: %2")
.arg(StelUtils::radToDecDegSt
r(angularSize / sphereScale,5,false,true))
.arg(StelUtils::radToDecDegSt
r(angularSize,5,false,true));
else
oss << q_("Apparent diameter: %1, sc
aled up to: %2")
.arg(StelUtils::radToDmsStr(a
ngularSize / sphereScale, true))
.arg(StelUtils::radToDmsStr(a
ngularSize, true));
}
else else
oss << q_("Apparent diameter: %1").arg(StelU {
tils::radToDmsStr(angularSize, true)); if (withDecimalDegree)
oss << q_("Apparent diameter: %1").a
rg(StelUtils::radToDecDegStr(angularSize,5,false,true));
else
oss << q_("Apparent diameter: %1").a
rg(StelUtils::radToDmsStr(angularSize, true));
}
} }
oss << "<br>"; oss << "<br>";
} }
double siderealPeriod = getSiderealPeriod(); double siderealPeriod = getSiderealPeriod();
double siderealDay = getSiderealDay(); double siderealDay = getSiderealDay();
if (flags&Extra) if (flags&Extra)
{ {
// This is a string you can activate for debugging. It shows the distance between observer and center of the body you are standing on. // This is a string you can activate for debugging. It shows the distance between observer and center of the body you are standing on.
// May be helpful for debugging critical parallax correction s for eclipses. // May be helpful for debugging critical parallax correction s for eclipses.
skipping to change at line 340 skipping to change at line 372
} }
else if (re.period==0.) else if (re.period==0.)
{ {
oss << q_("The period of rotation is chaotic ") << "<br>"; oss << q_("The period of rotation is chaotic ") << "<br>";
} }
} }
if (englishName != "Sun") if (englishName != "Sun")
{ {
const Vec3d& observerHelioPos = core->getObserverHel iocentricEclipticPos(); const Vec3d& observerHelioPos = core->getObserverHel iocentricEclipticPos();
const double elongation = getElongation(observerHeli oPos); const double elongation = getElongation(observerHeli oPos);
QString moonPhase = "";
if (englishName=="Moon" && core->getCurrentLocation(
).planetName=="Earth")
{
double eclJDE = GETSTELMODULE(SolarSystem)->
getEarth()->getRotObliquity(core->getJDE());
double ra_equ, dec_equ, lambdaMoon, lambdaSu
n, beta;
StelUtils::rectToSphe(&ra_equ,&dec_equ, getE
quinoxEquatorialPos(core));
StelUtils::equToEcl(ra_equ, dec_equ, eclJDE,
&lambdaMoon, &beta);
StelUtils::rectToSphe(&ra_equ,&dec_equ, GETS
TELMODULE(SolarSystem)->searchByEnglishName("Sun")->getEquinoxEquatorialPos
(core));
StelUtils::equToEcl(ra_equ, dec_equ, eclJDE,
&lambdaSun, &beta);
int deltaLong = (int)(lambdaMoon*180.f/M_PI
- lambdaSun*180.f/M_PI);
if (deltaLong<0) deltaLong+=360;
if (deltaLong==45)
moonPhase = qc_("Waxing Crescent", "
Moon phase");
if (deltaLong==90)
moonPhase = qc_("First Quarter", "Mo
on phase");
if (deltaLong==135)
moonPhase = qc_("Waxing Gibbous", "M
oon phase");
if (deltaLong==180)
moonPhase = qc_("Full Moon", "Moon p
hase");
if (deltaLong==225)
moonPhase = qc_("Waning Gibbous", "M
oon phase");
if (deltaLong==270)
moonPhase = qc_("Third Quarter", "Mo
on phase");
if (deltaLong==315)
moonPhase = qc_("Waning Crescent", "
Moon phase");
if (deltaLong==0 || deltaLong==360)
moonPhase = qc_("New Moon", "Moon ph
ase");
}
if (withDecimalDegree) if (withDecimalDegree)
{ {
oss << QString(q_("Phase Angle: %1")).arg(St elUtils::radToDecDegStr(getPhaseAngle(observerHelioPos),4,false,true)) << " <br>"; oss << QString(q_("Phase Angle: %1")).arg(St elUtils::radToDecDegStr(getPhaseAngle(observerHelioPos),4,false,true)) << " <br>";
oss << QString(q_("Elongation: %1")).arg(Ste lUtils::radToDecDegStr(elongation,4,false,true)) << "<br>"; oss << QString(q_("Elongation: %1")).arg(Ste lUtils::radToDecDegStr(elongation,4,false,true)) << "<br>";
} }
else else
{ {
oss << QString(q_("Phase Angle: %1")).arg(St oss << QString(q_("Phase Angle: %1")).arg(St
elUtils::radToDmsStr(getPhaseAngle(observerHelioPos))) << "<br>"; elUtils::radToDmsStr(getPhaseAngle(observerHelioPos), true)) << "<br>";
oss << QString(q_("Elongation: %1")).arg(Ste oss << QString(q_("Elongation: %1")).arg(Ste
lUtils::radToDmsStr(elongation)) << "<br>"; lUtils::radToDmsStr(elongation, true)) << "<br>";
} }
oss << QString(q_("Phase: %1")).arg(getPhase(observe oss << QString(q_("Phase: %1")).arg(getPhase(observe
rHelioPos), 0, 'f', 2) << "<br>"; rHelioPos), 0, 'f', 2);
if (!moonPhase.isEmpty())
oss << " (" << moonPhase << ")";
oss << "<br>";
oss << QString(q_("Illuminated: %1%")).arg(getPhase( observerHelioPos) * 100, 0, 'f', 1) << "<br>"; oss << QString(q_("Illuminated: %1%")).arg(getPhase( observerHelioPos) * 100, 0, 'f', 1) << "<br>";
} }
if (englishName=="Sun") if (englishName=="Sun")
{ {
// Only show during eclipse, show percent? // Only show during eclipse, show percent?
static SolarSystem *ssystem=GETSTELMODULE(SolarSyste m); static SolarSystem *ssystem=GETSTELMODULE(SolarSyste m);
// Debug solution: // Debug solution:
// float eclipseFactor = ssystem->getEclipseFactor(core ); // float eclipseFactor = ssystem->getEclipseFactor(core );
// oss << QString(q_("Eclipse Factor: %1 alpha: %2")).a rg(eclipseFactor).arg(-0.1f*qMax(-10.0f, (float) std::log10(eclipseFactor)) ) << "<br>"; // oss << QString(q_("Eclipse Factor: %1 alpha: %2")).a rg(eclipseFactor).arg(-0.1f*qMax(-10.0f, (float) std::log10(eclipseFactor)) ) << "<br>";
// Release version: // Release version:
skipping to change at line 1055 skipping to change at line 1118
if (englishName=="Pluto") if (englishName=="Pluto")
return -1.0 + d; return -1.0 + d;
break; break;
} }
case Harris: case Harris:
case UndefinedAlgorithm: // activated by defa ult case UndefinedAlgorithm: // activated by defa ult
{ {
// (2) // (2)
if (englishName=="Mercury") if (englishName=="Mercury")
return 0.42 + d + .038*phaseDeg - 0. 000273*phaseDeg*phaseDeg + 0.000002*phaseDeg*phaseDeg*phaseDeg; return -0.42 + d + .038*phaseDeg - 0 .000273*phaseDeg*phaseDeg + 0.000002*phaseDeg*phaseDeg*phaseDeg;
if (englishName=="Venus") if (englishName=="Venus")
return -4.40 + d + 0.0009*phaseDeg + 0.000239*phaseDeg*phaseDeg - 0.00000065*phaseDeg*phaseDeg*phaseDeg; return -4.40 + d + 0.0009*phaseDeg + 0.000239*phaseDeg*phaseDeg - 0.00000065*phaseDeg*phaseDeg*phaseDeg;
if (englishName=="Mars") if (englishName=="Mars")
return -1.52 + d + 0.016*phaseDeg; return -1.52 + d + 0.016*phaseDeg;
if (englishName=="Jupiter") if (englishName=="Jupiter")
return -9.40 + d + 0.005*phaseDeg; return -9.40 + d + 0.005*phaseDeg;
if (englishName=="Saturn") if (englishName=="Saturn")
{ {
// add rings computation // add rings computation
// implemented from Meeus, Astr.Alg. 1992 // implemented from Meeus, Astr.Alg. 1992
skipping to change at line 1122 skipping to change at line 1185
} }
// 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;
// Exclude drawing if user set a hard limit magnitude. // Exclude drawing if user set a hard limit magnitude.
if (core->getSkyDrawer()->getFlagPlanetMagnitudeLimit() && (getVMagn itude(core) > core->getSkyDrawer()->getCustomPlanetMagnitudeLimit())) if (core->getSkyDrawer()->getFlagPlanetMagnitudeLimit() && (getVMagn itude(core) > core->getSkyDrawer()->getCustomPlanetMagnitudeLimit()))
return; {
// Get the eclipse factor to avoid hiding the Moon during a
total solar eclipse.
// Details: https://answers.launchpad.net/stellarium/+questi
on/395139
if (GETSTELMODULE(SolarSystem)->getEclipseFactor(core)==1.0)
return;
}
// Try to improve speed for minor planets: test if visible at all. // Try to improve speed for minor planets: test if visible at all.
// For a full catalog of NEAs (11000 objects), with this and resetti ng deltaJD according to distance, rendering time went 4.5fps->12fps. // For a full catalog of NEAs (11000 objects), with this and resetti ng deltaJD according to distance, rendering time went 4.5fps->12fps.
// TBD: Note that taking away the asteroids at this stage breaks dim -asteroid occultation of stars! // TBD: Note that taking away the asteroids at this stage breaks dim -asteroid occultation of stars!
// Maybe make another configurable flag for those interested? // Maybe make another configurable flag for those interested?
// Problematic: Early-out here of course disables the wanted hint ci rcles for dim asteroids. // Problematic: Early-out here of course disables the wanted hint ci rcles for dim asteroids.
// The line makes hints for asteroids 5 magnitudes below sky limitin g magnitude visible. // The line makes hints for asteroids 5 magnitudes below sky limitin g magnitude visible.
// If asteroid is too faint to be seen, don't bother rendering. (Mas sive speedup if people have hundreds of orbital elements!) // If asteroid is too faint to be seen, don't bother rendering. (Mas sive speedup if people have hundreds of orbital elements!)
if (((getVMagnitude(core)-5.0f) > core->getSkyDrawer()->getLimitMagn // AW: Added a special case for educational purpose to drawing orbit
itude()) && pType>=Planet::isAsteroid) s for the Solar System Observer
// Details: https://sourceforge.net/p/stellarium/discussion/278769/t
hread/4828ebe4/
if (((getVMagnitude(core)-5.0f) > core->getSkyDrawer()->getLimitMagn
itude()) && pType>=Planet::isAsteroid && !core->getCurrentLocation().planet
Name.contains("Observer", Qt::CaseInsensitive))
{ {
return; 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;
skipping to change at line 1959 skipping to change at line 2029
Planet::hintCircleTex->bind(); Planet::hintCircleTex->bind();
sPainter.drawSprite2dMode(screenPos[0], screenPos[1], 11); sPainter.drawSprite2dMode(screenPos[0], screenPos[1], 11);
} }
Ring::Ring(float radiusMin, float radiusMax, const QString &texname) Ring::Ring(float radiusMin, float radiusMax, const QString &texname)
:radiusMin(radiusMin),radiusMax(radiusMax) :radiusMin(radiusMin),radiusMax(radiusMax)
{ {
tex = StelApp::getInstance().getTextureManager().createTexture(StelF ileMgr::getInstallationDir()+"/textures/"+texname); tex = StelApp::getInstance().getTextureManager().createTexture(StelF ileMgr::getInstallationDir()+"/textures/"+texname);
} }
Vec3f Planet::getCurrentOrbitColor()
{
Vec3f orbColor = orbitColor;
switch(orbitColorStyle)
{
case ocsGroups:
{
switch (pType)
{
case isMoon:
orbColor = orbitMoonsColor;
break;
case isPlanet:
orbColor = orbitMajorPlanetsColor;
break;
case isAsteroid:
orbColor = orbitMinorPlanetsColor;
break;
case isDwarfPlanet:
orbColor = orbitDwarfPlanetsColor;
break;
case isCubewano:
orbColor = orbitCubewanosColor;
break;
case isPlutino:
orbColor = orbitPlutinosColor;
break;
case isSDO:
orbColor = orbitScatteredDiscObjects
Color;
break;
case isOCO:
orbColor = orbitOortCloudObjectsColo
r;
break;
case isComet:
orbColor = orbitCometsColor;
break;
default:
orbColor = orbitColor;
}
break;
}
case ocsMajorPlanets:
{
QString pName = getEnglishName().toLower();
if (pName=="mercury")
orbColor = orbitMercuryColor;
else if (pName=="venus")
orbColor = orbitVenusColor;
else if (pName=="earth")
orbColor = orbitEarthColor;
else if (pName=="mars")
orbColor = orbitMarsColor;
else if (pName=="jupiter")
orbColor = orbitJupiterColor;
else if (pName=="saturn")
orbColor = orbitSaturnColor;
else if (pName=="uranus")
orbColor = orbitUranusColor;
else if (pName=="neptune")
orbColor = orbitNeptuneColor;
else
orbColor = orbitColor;
break;
}
case ocsOneColor:
{
orbColor = orbitColor;
break;
}
}
return orbColor;
}
// draw orbital path of Planet // draw orbital path of Planet
void Planet::drawOrbit(const StelCore* core) void Planet::drawOrbit(const StelCore* core)
{ {
if (!orbitFader.getInterstate()) if (!orbitFader.getInterstate())
return; return;
if (!re.siderealPeriod) if (!re.siderealPeriod)
return; return;
const StelProjectorP prj = core->getProjection(StelCore::FrameHelioc entricEclipticJ2000); const StelProjectorP prj = core->getProjection(StelCore::FrameHelioc entricEclipticJ2000);
StelPainter sPainter(prj); StelPainter sPainter(prj);
// Normal transparency mode // Normal transparency mode
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND); glEnable(GL_BLEND);
sPainter.setColor(orbitColor[0], orbitColor[1], orbitColor[2], orbit Vec3f orbColor = getCurrentOrbitColor();
Fader.getInterstate());
sPainter.setColor(orbColor[0], orbColor[1], orbColor[2], orbitFader.
getInterstate());
Vec3d onscreen; Vec3d onscreen;
// special case - use current Planet position as center vertex so th at draws // special case - use current Planet position as center vertex so th at draws
// on its orbit all the time (since segmented rather than smooth cur ve) // on its orbit all the time (since segmented rather than smooth cur ve)
Vec3d savePos = orbit[ORBIT_SEGMENTS/2]; Vec3d savePos = orbit[ORBIT_SEGMENTS/2];
orbit[ORBIT_SEGMENTS/2]=getHeliocentricEclipticPos(); orbit[ORBIT_SEGMENTS/2]=getHeliocentricEclipticPos();
orbit[ORBIT_SEGMENTS]=orbit[0]; orbit[ORBIT_SEGMENTS]=orbit[0];
int nbIter = closeOrbit ? ORBIT_SEGMENTS : ORBIT_SEGMENTS-1; int nbIter = closeOrbit ? ORBIT_SEGMENTS : ORBIT_SEGMENTS-1;
QVarLengthArray<float, 1024> vertexArray; QVarLengthArray<float, 1024> vertexArray;
sPainter.enableClientStates(true, false, false); sPainter.enableClientStates(true, false, false);
 End of changes. 18 change blocks. 
32 lines changed or deleted 209 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/