ZodiacalLight.cpp   ZodiacalLight.cpp 
skipping to change at line 102 skipping to change at line 102
// Test if we are not on Earth. Texture would not fit, so don't draw then. // Test if we are not on Earth. Texture would not fit, so don't draw then.
if (core->getCurrentLocation().planetName != "Earth") return; if (core->getCurrentLocation().planetName != "Earth") return;
double currentJD=core->getJD(); double currentJD=core->getJD();
if (qAbs(currentJD - lastJD) > 0.25f) // should be enough to update position every 6 hours. if (qAbs(currentJD - lastJD) > 0.25f) // should be enough to update position every 6 hours.
{ {
// update vertices // update vertices
Vec3d obsPos=core->getObserverHeliocentricEclipticPos(); Vec3d obsPos=core->getObserverHeliocentricEclipticPos();
// For solar-centered texture, take minus, else plus: // For solar-centered texture, take minus, else plus:
double solarLongitude=atan2(obsPos[1], obsPos[0]) - 0.5*M_PI ; double solarLongitude=atan2(obsPos[1], obsPos[0]) - 0.5*M_PI ;
Mat4d transMat=core->matVsop87ToJ2000 * Mat4d::zrotation(sol arLongitude); Mat4d transMat=StelCore::matVsop87ToJ2000 * Mat4d::zrotation (solarLongitude);
for (int i=0; i<eclipticalVertices.size(); ++i) for (int i=0; i<eclipticalVertices.size(); ++i)
{ {
Vec3d tmp=eclipticalVertices.at(i); Vec3d tmp=eclipticalVertices.at(i);
vertexArray->vertex.replace(i, transMat * tmp); vertexArray->vertex.replace(i, transMat * tmp);
} }
lastJD=currentJD; lastJD=currentJD;
} }
} }
void ZodiacalLight::setFlagShow(bool b) void ZodiacalLight::setFlagShow(bool b)
{ {
*fader = b; *fader = b;
emit zodiacalLightDisplayedChanged(b);
} }
bool ZodiacalLight::getFlagShow() const bool ZodiacalLight::getFlagShow() const
{ {
return *fader; return *fader;
} }
void ZodiacalLight::draw(StelCore* core) void ZodiacalLight::draw(StelCore* core)
{ {
if (!getFlagShow() || (getIntensity()<0.01) ) if (!getFlagShow() || (getIntensity()<0.01) )
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 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/