ZoneArray.cpp   ZoneArray.cpp 
skipping to change at line 32 skipping to change at line 32
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <io.h> #include <io.h>
#include <windows.h> #include <windows.h>
#endif #endif
#include "ZoneArray.hpp" #include "ZoneArray.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelGeodesicGrid.hpp" #include "StelGeodesicGrid.hpp"
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelNavigator.hpp"
static unsigned int stel_bswap_32(unsigned int val) { static unsigned int stel_bswap_32(unsigned int val) {
return (((val) & 0xff000000) >> 24) | (((val) & 0x00ff0000) >> 8) | return (((val) & 0xff000000) >> 24) | (((val) & 0x00ff0000) >> 8) |
(((val) & 0x0000ff00) << 8) | (((val) & 0x000000ff) << 24); (((val) & 0x0000ff00) << 8) | (((val) & 0x000000ff) << 24);
} }
namespace BigStarCatalogExtension namespace BigStarCatalogExtension
{ {
static const Vec3f north(0,0,1); static const Vec3f north(0,0,1);
skipping to change at line 485 skipping to change at line 484
template<class Star> template<class Star>
void SpecialZoneArray<Star>::draw(StelPainter* sPainter, int index, bool is _inside, const float *rcmag_table, StelCore* core, unsigned int maxMagStarN ame, void SpecialZoneArray<Star>::draw(StelPainter* sPainter, int index, bool is _inside, const float *rcmag_table, StelCore* core, unsigned int maxMagStarN ame,
float names_brightness) const float names_brightness) const
{ {
StelSkyDrawer* drawer = core->getSkyDrawer(); StelSkyDrawer* drawer = core->getSkyDrawer();
SpecialZoneData<Star> *const z = getZones() + index; SpecialZoneData<Star> *const z = getZones() + index;
Vec3f vf; Vec3f vf;
const Star *const end = z->getStars() + z->size; const Star *const end = z->getStars() + z->size;
static const double d2000 = 2451545.0; static const double d2000 = 2451545.0;
const double movementFactor = (M_PI/180)*(0.0001/3600) * ((core->get Navigator()->getJDay()-d2000)/365.25) / star_position_scale; const double movementFactor = (M_PI/180)*(0.0001/3600) * ((core->get JDay()-d2000)/365.25) / star_position_scale;
const float* tmpRcmag; const float* tmpRcmag;
for (const Star *s=z->getStars();s<end;++s) for (const Star *s=z->getStars();s<end;++s)
{ {
tmpRcmag = rcmag_table+2*s->mag; tmpRcmag = rcmag_table+2*s->mag;
if (*tmpRcmag<=0.f) if (*tmpRcmag<=0.f)
break; break;
s->getJ2000Pos(z,movementFactor, vf); s->getJ2000Pos(z,movementFactor, vf);
if (drawer->drawPointSource(sPainter, vf, tmpRcmag, s->bV, ! is_inside) && s->hasName() && s->mag < maxMagStarName) if (drawer->drawPointSource(sPainter, vf, tmpRcmag, s->bV, ! is_inside) && s->hasName() && s->mag < maxMagStarName && s->hasComponentID( )<=1)
{ {
const float offset = *tmpRcmag*0.7f; const float offset = *tmpRcmag*0.7f;
const Vec3f& colorr = (StelApp::getInstance().getVis ionModeNight() ? Vec3f(0.8f, 0.2f, 0.2f) : StelSkyDrawer::indexToColor(s->b V))*0.75f; const Vec3f& colorr = (StelApp::getInstance().getVis ionModeNight() ? Vec3f(0.8f, 0.2f, 0.2f) : StelSkyDrawer::indexToColor(s->b V))*0.75f;
sPainter->setColor(colorr[0], colorr[1], colorr[2],n ames_brightness); sPainter->setColor(colorr[0], colorr[1], colorr[2],n ames_brightness);
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 StelNavigator* nav, int ind ex, 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.) * ((nav->ge tJDay()-d2000)/365.25)/ star_position_scale; const double movementFactor = (M_PI/180.)*(0.0001/3600.) * ((core->g etJDay()-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. 5 change blocks. 
5 lines changed or deleted 4 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/