NebulaMgr.cpp   NebulaMgr.cpp 
skipping to change at line 56 skipping to change at line 56
#include "StelPainter.hpp" #include "StelPainter.hpp"
#include "RefractionExtinction.hpp" #include "RefractionExtinction.hpp"
void NebulaMgr::setLabelsColor(const Vec3f& c) {Nebula::labelColor = c;} void NebulaMgr::setLabelsColor(const Vec3f& c) {Nebula::labelColor = c;}
const Vec3f &NebulaMgr::getLabelsColor(void) const {return Nebula::labelCol or;} const Vec3f &NebulaMgr::getLabelsColor(void) const {return Nebula::labelCol or;}
void NebulaMgr::setCirclesColor(const Vec3f& c) {Nebula::circleColor = c;} void NebulaMgr::setCirclesColor(const Vec3f& c) {Nebula::circleColor = c;}
const Vec3f &NebulaMgr::getCirclesColor(void) const {return Nebula::circleC olor;} const Vec3f &NebulaMgr::getCirclesColor(void) const {return Nebula::circleC olor;}
void NebulaMgr::setCircleScale(float scale) {Nebula::circleScale = scale;} void NebulaMgr::setCircleScale(float scale) {Nebula::circleScale = scale;}
float NebulaMgr::getCircleScale(void) const {return Nebula::circleScale;} float NebulaMgr::getCircleScale(void) const {return Nebula::circleScale;}
NebulaMgr::NebulaMgr(void) : nebGrid(200), displayNoTexture(false) NebulaMgr::NebulaMgr(void) : nebGrid(200)
{ {
setObjectName("NebulaMgr"); setObjectName("NebulaMgr");
} }
NebulaMgr::~NebulaMgr() NebulaMgr::~NebulaMgr()
{ {
Nebula::texCircle = StelTextureSP(); Nebula::texCircle = StelTextureSP();
Nebula::texOpenCluster = StelTextureSP(); Nebula::texOpenCluster = StelTextureSP();
Nebula::texGlobularCluster = StelTextureSP(); Nebula::texGlobularCluster = StelTextureSP();
Nebula::texPlanetNebula = StelTextureSP(); Nebula::texPlanetNebula = StelTextureSP();
skipping to change at line 106 skipping to change at line 106
Nebula::texOpenCluster = StelApp::getInstance().getTextureManager(). createTexture("textures/ocl.png"); // Load open clister marker texture Nebula::texOpenCluster = StelApp::getInstance().getTextureManager(). createTexture("textures/ocl.png"); // Load open clister marker texture
Nebula::texGlobularCluster = StelApp::getInstance().getTextureManage r().createTexture("textures/gcl.png"); // Load globular clister marker te xture Nebula::texGlobularCluster = StelApp::getInstance().getTextureManage r().createTexture("textures/gcl.png"); // Load globular clister marker te xture
Nebula::texPlanetNebula = StelApp::getInstance().getTextureManager() .createTexture("textures/pnb.png"); // Load planetary nebula marker textu re Nebula::texPlanetNebula = StelApp::getInstance().getTextureManager() .createTexture("textures/pnb.png"); // Load planetary nebula marker textu re
texPointer = StelApp::getInstance().getTextureManager().createTextur e("textures/pointeur5.png"); // Load pointer texture texPointer = StelApp::getInstance().getTextureManager().createTextur e("textures/pointeur5.png"); // Load pointer texture
setFlagShow(conf->value("astro/flag_nebula",true).toBool()); setFlagShow(conf->value("astro/flag_nebula",true).toBool());
setFlagHints(conf->value("astro/flag_nebula_name",false).toBool()); setFlagHints(conf->value("astro/flag_nebula_name",false).toBool());
setHintsAmount(conf->value("astro/nebula_hints_amount", 3).toFloat() ); setHintsAmount(conf->value("astro/nebula_hints_amount", 3).toFloat() );
setLabelsAmount(conf->value("astro/nebula_labels_amount", 3).toFloat ()); setLabelsAmount(conf->value("astro/nebula_labels_amount", 3).toFloat ());
setCircleScale(conf->value("astro/nebula_scale",1.0f).toFloat()); setCircleScale(conf->value("astro/nebula_scale",1.0f).toFloat());
setFlagDisplayNoTexture(conf->value("astro/flag_nebula_display_no_te xture", false).toBool());
updateI18n(); updateI18n();
StelApp *app = &StelApp::getInstance(); StelApp *app = &StelApp::getInstance();
connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n())); connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n()));
connect(app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT( setStelStyle(const QString&))); connect(app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT( setStelStyle(const QString&)));
GETSTELMODULE(StelObjectMgr)->registerStelObjectMgr(this); GETSTELMODULE(StelObjectMgr)->registerStelObjectMgr(this);
} }
struct DrawNebulaFuncObject struct DrawNebulaFuncObject
skipping to change at line 182 skipping to change at line 181
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)- >getSelectedObject("Nebula"); const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)- >getSelectedObject("Nebula");
if (!newSelected.empty()) if (!newSelected.empty())
{ {
const StelObjectP obj = newSelected[0]; const StelObjectP obj = newSelected[0];
Vec3d pos=obj->getJ2000EquatorialPos(core); Vec3d pos=obj->getJ2000EquatorialPos(core);
// Compute 2D pos and return if outside screen // Compute 2D pos and return if outside screen
if (!prj->projectInPlace(pos)) return; if (!prj->projectInPlace(pos)) return;
sPainter.setColor(0.4f,0.5f,0.8f); if (StelApp::getInstance().getVisionModeNight())
sPainter.setColor(0.8f,0.0f,0.0f);
else
sPainter.setColor(0.4f,0.5f,0.8f);
texPointer->bind(); texPointer->bind();
sPainter.enableTexture2d(true); sPainter.enableTexture2d(true);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
// Size on screen // Size on screen
float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter(); float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter();
size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime()); size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getT otalRunTime());
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 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/