Nebula.cpp   Nebula.cpp 
skipping to change at line 509 skipping to change at line 509
break; break;
default: default:
Nebula::texCircle->bind(); Nebula::texCircle->bind();
} }
Vec3f col(color[0]*lum*hintsBrightness, color[1]*lum*hintsBrightness , color[2]*lum*hintsBrightness); Vec3f col(color[0]*lum*hintsBrightness, color[1]*lum*hintsBrightness , color[2]*lum*hintsBrightness);
if (!objectInDisplayedType()) if (!objectInDisplayedType())
col = Vec3f(0.f,0.f,0.f); col = Vec3f(0.f,0.f,0.f);
sPainter.setColor(col[0], col[1], col[2], 1); sPainter.setColor(col[0], col[1], col[2], 1);
//Q_ASSERT(majorAxisSize>0.); // THIS ASSERT FAILS. Catalog error? float size = 6.0f;
if (drawHintProportional && (majorAxisSize>0.)) float scaledSize = 0.0f;
if (drawHintProportional)
{ {
float size = majorAxisSize *0.5 *M_PI/180.*sPainter.getProje if (majorAxisSize>0.)
ctor()->getPixelPerRadAtCenter(); scaledSize = majorAxisSize *0.5 *M_PI/180.*sPainter.
// Rotation looks good only for galaxies. getProjector()->getPixelPerRadAtCenter();
if ((nType <=NebQSO) || (nType==NebBLA) || (nType==NebBLL) ) else
{ scaledSize = minorAxisSize *0.5 *M_PI/180.*sPainter.
// The rotation angle in drawSprite2dMode() is relat getProjector()->getPixelPerRadAtCenter();
ive to screen. Make sure to compute correct angle from 90+orientationAngle.
// Find an on-screen direction vector from a point o
ffset somewhat in declination from our object.
Vec3d XYZrel(XYZ);
XYZrel[2]*=0.99;
Vec3d XYrel;
sPainter.getProjector()->project(XYZrel, XYrel);
float screenAngle=atan2(XYrel[1]-XY[1], XYrel[0]-XY[
0]);
sPainter.drawSprite2dMode(XY[0], XY[1], qMax(6.0f,si
ze), screenAngle*180./M_PI + orientationAngle);
}
else // no galaxy
sPainter.drawSprite2dMode(XY[0], XY[1], qMax(6.0f,si
ze));
} }
else // not proportional or size unknown
sPainter.drawSprite2dMode(XY[0], XY[1], 6.0f); // Rotation looks good only for galaxies.
if ((nType <=NebQSO) || (nType==NebBLA) || (nType==NebBLL) )
{
// The rotation angle in drawSprite2dMode() is relative to s
creen. Make sure to compute correct angle from 90+orientationAngle.
// Find an on-screen direction vector from a point offset so
mewhat in declination from our object.
Vec3d XYZrel(XYZ);
XYZrel[2]*=0.99;
Vec3d XYrel;
sPainter.getProjector()->project(XYZrel, XYrel);
float screenAngle=atan2(XYrel[1]-XY[1], XYrel[0]-XY[0]);
sPainter.drawSprite2dMode(XY[0], XY[1], qMax(size, scaledSiz
e), screenAngle*180./M_PI + orientationAngle);
}
else // no galaxy
sPainter.drawSprite2dMode(XY[0], XY[1], qMax(size, scaledSiz
e));
} }
void Nebula::drawLabel(StelPainter& sPainter, float maxMagLabel) void Nebula::drawLabel(StelPainter& sPainter, float maxMagLabel)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
float lim = qMin(vMag, bMag); float lim = qMin(vMag, bMag);
if (surfaceBrightnessUsage) if (surfaceBrightnessUsage)
{ {
 End of changes. 3 change blocks. 
25 lines changed or deleted 29 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/