Index: body.h =================================================================== --- body.h (revision 4465) +++ body.h (working copy) @@ -300,6 +300,8 @@ bool isSecondaryIlluminator() const { return secondaryIlluminator; } void setSecondaryIlluminator(bool enable); + bool hasVisibleGeometry() const { return classification != Invisible && visible != 0; } + VisibilityPolicy getOrbitVisibility() const { return orbitVisibility; } void setOrbitVisibility(VisibilityPolicy _orbitVisibility); Index: render.cpp =================================================================== --- render.cpp (revision 4467) +++ render.cpp (working copy) @@ -7728,7 +7728,7 @@ // ignore eclipses where the caster is not an ellipsoid, since we can't // generate correct shadows in this case. if (caster.getRadius() >= receiver.getRadius() * MinRelativeOccluderRadius && - caster.isVisible() && + caster.hasVisibleGeometry() && caster.extant(now) && caster.isEllipsoid()) { @@ -7892,7 +7892,7 @@ // Calculate eclipse circumstances if ((renderFlags & ShowEclipseShadows) != 0 && - body.isVisible() && + body.hasVisibleGeometry() && body.getSystem() != NULL) { PlanetarySystem* system = body.getSystem(); @@ -8655,7 +8655,7 @@ bool visibleAsPoint = appMag < faintestPlanetMag && body->isVisibleAsPoint(); bool isLabeled = (body->getOrbitClassification() & labelClassMask) != 0; bool visible = body->isVisible(); - +#if 0 // Special case for barycenters of planetary systems. Ordinarily, labels of invisible // objects should not be shown, but we do want them to be shown for planetary system // barycenters (e.g. Pluto-Charon) @@ -8667,7 +8667,7 @@ visible = true; } } - +#endif if ((discSize > 1 || visibleAsPoint || isLabeled) && visible) { RenderListEntry rle; @@ -8796,6 +8796,10 @@ Body* body = phase->body(); + // If the body isn't visible, neither is the orbit + if (!body->isVisible()) + continue; + // pos_s: sun-relative position of object // pos_v: viewer-relative position of object