StelObjectMgr.cpp   StelObjectMgr.cpp 
skipping to change at line 36 skipping to change at line 36
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "RefractionExtinction.hpp" #include "RefractionExtinction.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include <QMouseEvent> #include <QMouseEvent>
#include <QString> #include <QString>
#include <QDebug> #include <QDebug>
#include <QStringList> #include <QStringList>
StelObjectMgr::StelObjectMgr() : searchRadiusPixel(30.f), distanceWeight(1. f) StelObjectMgr::StelObjectMgr() : searchRadiusPixel(25.f), distanceWeight(1. f)
{ {
setObjectName("StelObjectMgr"); setObjectName("StelObjectMgr");
objectPointerVisibility = true; objectPointerVisibility = true;
} }
StelObjectMgr::~StelObjectMgr() StelObjectMgr::~StelObjectMgr()
{ {
} }
/************************************************************************* /*************************************************************************
skipping to change at line 132 skipping to change at line 132
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
// Field of view for a searchRadiusPixel pixel diameter circle on sc reen // Field of view for a searchRadiusPixel pixel diameter circle on sc reen
float fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj- >getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel; float fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj- >getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel;
// Collect the objects inside the range // Collect the objects inside the range
foreach (const StelObjectModule* m, objectsModule) foreach (const StelObjectModule* m, objectsModule)
candidates += m->searchAround(v, fov_around, core); candidates += m->searchAround(v, fov_around, core);
float limitMag = core->getSkyDrawer()->getLimitMagnitude()-2.f;
QList<StelObjectP> tmp;
foreach (const StelObjectP& obj, candidates)
{
if (obj->getSelectPriority(core)<=limitMag)
tmp.append(obj);
}
candidates = tmp;
// Now select the object minimizing the function y = distance(in pix el) + magnitude // Now select the object minimizing the function y = distance(in pix el) + magnitude
Vec3d winpos; Vec3d winpos;
prj->project(v, winpos); prj->project(v, winpos);
float xpos = winpos[0]; float xpos = winpos[0];
float ypos = winpos[1]; float ypos = winpos[1];
float best_object_value; float best_object_value;
best_object_value = 100000.f; best_object_value = 100000.f;
foreach (const StelObjectP& obj, candidates) foreach (const StelObjectP& obj, candidates)
{ {
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 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/