StelSkyImageTile.cpp   StelSkyImageTile.cpp 
skipping to change at line 294 skipping to change at line 294
{ {
Vec4f extinctedColor=color; Vec4f extinctedColor=color;
if (withExtinction) if (withExtinction)
{ {
Vec3d bary= poly->getPointInside(); // This is a J00 0.0 vector that points "somewhere" in the first triangle. Vec3d bary= poly->getPointInside(); // This is a J00 0.0 vector that points "somewhere" in the first triangle.
Vec3d altAz = core->j2000ToAltAz(bary, StelCore::Ref ractionOn); Vec3d altAz = core->j2000ToAltAz(bary, StelCore::Ref ractionOn);
float extinctionMagnitude=0.0f; float extinctionMagnitude=0.0f;
extinction.forward(&(altAz[2]), &extinctionMagnitude ); extinction.forward(&(altAz[2]), &extinctionMagnitude );
// compute a simple factor from magnitude loss. // compute a simple factor from magnitude loss.
float extinctionFactor=pow(0.4, extinctionMagnitude) ; // drop of one magnitude: factor 2.5 or 40% float extinctionFactor=pow(0.4f , extinctionMagnitud e); // drop of one magnitude: factor 2.5 or 40%
extinctedColor[0]*=fabs(extinctionFactor); extinctedColor[0]*=fabs(extinctionFactor);
extinctedColor[1]*=fabs(extinctionFactor); extinctedColor[1]*=fabs(extinctionFactor);
extinctedColor[2]*=fabs(extinctionFactor); extinctedColor[2]*=fabs(extinctionFactor);
} }
renderer->setGlobalColor(extinctedColor); renderer->setGlobalColor(extinctedColor);
// GZ: this was the original code now. // GZ: this was the original code now.
poly->drawFill(renderer, SphericalRegion::DrawParams(&(*proj ector))); poly->drawFill(renderer, SphericalRegion::DrawParams(&(*proj ector)));
} }
#ifdef DEBUG_STELSKYIMAGE_TILE #ifdef DEBUG_STELSKYIMAGE_TILE
 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/