ZoneArray.cpp   ZoneArray.cpp 
skipping to change at line 469 skipping to change at line 469
} }
template<class Star> template<class Star>
void SpecialZoneArray<Star>::draw(StelPainter* sPainter, int index, bool is InsideViewport, const RCMag* rcmag_table, void SpecialZoneArray<Star>::draw(StelPainter* sPainter, int index, bool is InsideViewport, const RCMag* rcmag_table,
int limitMagIndex, StelCore* core, int max MagStarName, float names_brightness, int limitMagIndex, StelCore* core, int max MagStarName, float names_brightness,
const QVector<SphericalCap> &boundingCaps) const const QVector<SphericalCap> &boundingCaps) const
{ {
StelSkyDrawer* drawer = core->getSkyDrawer(); StelSkyDrawer* drawer = core->getSkyDrawer();
Vec3f vf; Vec3f vf;
static const double d2000 = 2451545.0; static const double d2000 = 2451545.0;
const float movementFactor = (M_PI/180)*(0.0001/3600) * ((core->getJ Day()-d2000)/365.25) / star_position_scale; const float movementFactor = (M_PI/180)*(0.0001/3600) * ((core->getJ DE()-d2000)/365.25) / star_position_scale;
// GZ, added for extinction // GZ, added for extinction
const Extinction& extinction=core->getSkyDrawer()->getExtinction(); const Extinction& extinction=core->getSkyDrawer()->getExtinction();
const bool withExtinction=drawer->getFlagHasAtmosphere() && extincti on.getExtinctionCoefficient()>=0.01f; const bool withExtinction=drawer->getFlagHasAtmosphere() && extincti on.getExtinctionCoefficient()>=0.01f;
const float k = 0.001f*mag_range/mag_steps; // from StarMgr.cpp line 654 const float k = 0.001f*mag_range/mag_steps; // from StarMgr.cpp line 654
// Allow artificial cutoff: // Allow artificial cutoff:
// find the (integer) mag at which is just bright enough to be drawn . // find the (integer) mag at which is just bright enough to be drawn .
int cutoffMagStep=limitMagIndex; int cutoffMagStep=limitMagIndex;
if (drawer->getFlagStarMagnitudeLimit()) if (drawer->getFlagStarMagnitudeLimit())
skipping to change at line 551 skipping to change at line 551
sPainter->drawText(Vec3d(vf[0], vf[1], vf[2]), s->ge tNameI18n(), 0, offset, offset, false); sPainter->drawText(Vec3d(vf[0], vf[1], vf[2]), s->ge tNameI18n(), 0, offset, offset, false);
} }
} }
} }
template<class Star> template<class Star>
void SpecialZoneArray<Star>::searchAround(const StelCore* core, int index, const Vec3d &v, double cosLimFov, void SpecialZoneArray<Star>::searchAround(const StelCore* core, int index, const Vec3d &v, double cosLimFov,
QList<StelObjectP > &result) QList<StelObjectP > &result)
{ {
static const double d2000 = 2451545.0; static const double d2000 = 2451545.0;
const double movementFactor = (M_PI/180.)*(0.0001/3600.) * ((core->g etJDay()-d2000)/365.25)/ star_position_scale; const double movementFactor = (M_PI/180.)*(0.0001/3600.) * ((core->g etJDE()-d2000)/365.25)/ star_position_scale;
const SpecialZoneData<Star> *const z = getZones()+index; const SpecialZoneData<Star> *const z = getZones()+index;
Vec3f tmp; Vec3f tmp;
Vec3f vf(v[0], v[1], v[2]); Vec3f vf(v[0], v[1], v[2]);
for (const Star* s=z->getStars();s<z->getStars()+z->size;++s) for (const Star* s=z->getStars();s<z->getStars()+z->size;++s)
{ {
s->getJ2000Pos(z,movementFactor, tmp); s->getJ2000Pos(z,movementFactor, tmp);
tmp.normalize(); tmp.normalize();
if (tmp*vf >= cosLimFov) if (tmp*vf >= cosLimFov)
{ {
// TODO: do not select stars that are too faint to d isplay // TODO: do not select stars that are too faint to d isplay
 End of changes. 2 change blocks. 
2 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/