Pulsar.cpp   Pulsar.cpp 
skipping to change at line 49 skipping to change at line 49
#define PSR_INERTIA 1.0e45 /* Typical moment of inertia for a pulsar */ #define PSR_INERTIA 1.0e45 /* Typical moment of inertia for a pulsar */
StelTextureSP Pulsar::markerTexture; StelTextureSP Pulsar::markerTexture;
bool Pulsar::distributionMode = false; bool Pulsar::distributionMode = false;
bool Pulsar::glitchFlag = false; bool Pulsar::glitchFlag = false;
Vec3f Pulsar::markerColor = Vec3f(0.4f,0.5f,1.0f); Vec3f Pulsar::markerColor = Vec3f(0.4f,0.5f,1.0f);
Vec3f Pulsar::glitchColor = Vec3f(0.2f,0.3f,1.0f); Vec3f Pulsar::glitchColor = Vec3f(0.2f,0.3f,1.0f);
Pulsar::Pulsar(const QVariantMap& map) Pulsar::Pulsar(const QVariantMap& map)
: initialized(false), : initialized(false)
designation(""), , designation("")
RA(0.), , RA(0.)
DE(0.), , DE(0.)
parallax(0.), , parallax(0.)
period(0.), , period(0.)
frequency(0.), , frequency(0.)
pfrequency(0.), , pfrequency(0.)
pderivative(0.), , pderivative(0.)
dmeasure(0.), , dmeasure(0.)
bperiod(0.), , bperiod(0.)
eccentricity(0.), , eccentricity(0.)
w50(0.), , w50(0.)
s400(0.), , s400(0.)
s600(0.), , s600(0.)
s1400(0.), , s1400(0.)
distance(0.), , distance(0.)
glitch(-1), , glitch(-1)
notes("") , notes("")
{ {
// return initialized if the mandatory fields are not present if (!map.contains("designation") || !map.contains("RA") || !map.cont
if (!map.contains("designation")) ains("DE"))
{
qWarning() << "Pulsar: INVALID pulsar!" << map.value("design
ation").toString();
qWarning() << "Pulsar: Please, check your 'pulsars.json' cat
alog!";
return; return;
}
designation = map.value("designation").toString(); designation = map.value("designation").toString();
parallax = map.value("parallax").toFloat(); parallax = map.value("parallax").toFloat();
period = map.value("period").toDouble(); period = map.value("period").toDouble();
bperiod = map.value("bperiod").toDouble(); bperiod = map.value("bperiod").toDouble();
frequency = map.value("frequency").toDouble(); frequency = map.value("frequency").toDouble();
pfrequency = map.value("pfrequency").toDouble(); pfrequency = map.value("pfrequency").toDouble();
pderivative = map.value("pderivative").toDouble(); pderivative = map.value("pderivative").toDouble();
dmeasure = map.value("dmeasure").toDouble(); dmeasure = map.value("dmeasure").toDouble();
eccentricity = map.value("eccentricity").toDouble(); eccentricity = map.value("eccentricity").toDouble();
skipping to change at line 386 skipping to change at line 389
StelUtils::spheToRect(RA, DE, XYZ); StelUtils::spheToRect(RA, DE, XYZ);
Vec3d win; Vec3d win;
// Check visibility of pulsar // Check visibility of pulsar
if (!(painter->getProjector()->projectCheck(XYZ, win))) if (!(painter->getProjector()->projectCheck(XYZ, win)))
return; return;
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
if (glitch>0 && glitchFlag) if (glitch>0 && glitchFlag)
painter->setColor(glitchColor[0], glitchColor[1], glitchColo r[2], 1); painter->setColor(glitchColor[0], glitchColor[1], glitchColo r[2], 1.f);
else else
painter->setColor(markerColor[0], markerColor[1], markerColo r[2], 1); painter->setColor(markerColor[0], markerColor[1], markerColo r[2], 1.f);
float mlimit = sd->getLimitMagnitude(); float mlimit = sd->getLimitMagnitude();
if (mag <= mlimit) if (mag <= mlimit)
{ {
Pulsar::markerTexture->bind(); Pulsar::markerTexture->bind();
float size = getAngularSize(NULL)*M_PI/180.*painter->getProj ector()->getPixelPerRadAtCenter(); float size = getAngularSize(NULL)*M_PI/180.*painter->getProj ector()->getPixelPerRadAtCenter();
float shift = 5.f + size/1.6f; float shift = 5.f + size/1.6f;
painter->drawSprite2dMode(XYZ, distributionMode ? 4.f : 5.f) ; painter->drawSprite2dMode(XYZ, distributionMode ? 4.f : 5.f) ;
 End of changes. 5 change blocks. 
23 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/