Atmosphere.cpp   Atmosphere.cpp 
skipping to change at line 126 skipping to change at line 126
StelCore* core, f loat latitude, float altitude, float temperature, float relativeHumidity) StelCore* core, f loat latitude, float altitude, float temperature, float relativeHumidity)
{ {
const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff); const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff);
if (viewport != prj->getViewport()) if (viewport != prj->getViewport())
{ {
// The viewport changed: update the number of point of the g rid // The viewport changed: update the number of point of the g rid
viewport = prj->getViewport(); viewport = prj->getViewport();
delete[] colorGrid; delete[] colorGrid;
delete [] posGrid; delete [] posGrid;
skyResolutionY = StelApp::getInstance().getSettings()->value ("landscape/atmosphereybin", 44).toInt(); skyResolutionY = StelApp::getInstance().getSettings()->value ("landscape/atmosphereybin", 44).toInt();
skyResolutionX = (int)floor(0.5+skyResolutionY*(0.5*sqrt(3.0 ))*prj->getViewportWidth()/prj->getViewportHeight()); skyResolutionX = (int)floor(0.5+skyResolutionY*(0.5*std::sqr t(3.0))*prj->getViewportWidth()/prj->getViewportHeight());
posGrid = new Vec2f[(1+skyResolutionX)*(1+skyResolutionY)]; posGrid = new Vec2f[(1+skyResolutionX)*(1+skyResolutionY)];
colorGrid = new Vec4f[(1+skyResolutionX)*(1+skyResolutionY)] ; colorGrid = new Vec4f[(1+skyResolutionX)*(1+skyResolutionY)] ;
float stepX = (float)prj->getViewportWidth() / (skyResolutio nX-0.5); float stepX = (float)prj->getViewportWidth() / (skyResolutio nX-0.5);
float stepY = (float)prj->getViewportHeight() / skyResolutio nY; float stepY = (float)prj->getViewportHeight() / skyResolutio nY;
float viewport_left = (float)prj->getViewportPosX(); float viewport_left = (float)prj->getViewportPosX();
float viewport_bottom = (float)prj->getViewportPosY(); float viewport_bottom = (float)prj->getViewportPosY();
for (int x=0; x<=skyResolutionX; ++x) for (int x=0; x<=skyResolutionX; ++x)
{ {
for(int y=0; y<=skyResolutionY; ++y) for(int y=0; y<=skyResolutionY; ++y)
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 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/