コード例 #1
0
void StelGui::initLandscapeMgr()
{
	LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr);
	getGuiAction("actionShow_Ground")->setChecked(landscapeMgr->getFlagLandscape());
	connect(getGuiAction("actionShow_Ground"),
					SIGNAL(toggled(bool)),
					landscapeMgr,
					SLOT(setFlagLandscape(bool)));
	connect(landscapeMgr,
					SIGNAL(landscapeDisplayedChanged(const bool)),
					this,
					SLOT(landscapeDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Cardinal_Points")->setChecked(landscapeMgr->getFlagCardinalsPoints());
	connect(getGuiAction("actionShow_Cardinal_Points"),
					SIGNAL(toggled(bool)),
					landscapeMgr,
					SLOT(setFlagCardinalsPoints(bool)));
	connect(landscapeMgr,
					SIGNAL(cardinalsPointsDisplayedChanged(const bool)),
					this,
					SLOT(cardinalsPointsDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Atmosphere")->setChecked(landscapeMgr->getFlagAtmosphere());
	connect(getGuiAction("actionShow_Atmosphere"),
					SIGNAL(toggled(bool)),
					landscapeMgr,
					SLOT(setFlagAtmosphere(bool)));
	connect(landscapeMgr,
					SIGNAL(atmosphereDisplayedChanged(const bool)),
					this,
					SLOT(atmosphereDisplayedUpdated(const bool)));

	getGuiAction("actionShow_Fog")->setChecked(landscapeMgr->getFlagFog());
	connect(getGuiAction("actionShow_Fog"),
					SIGNAL(toggled(bool)),
					landscapeMgr,
					SLOT(setFlagFog(bool)));
	connect(landscapeMgr,
					SIGNAL(fogDisplayedChanged(const bool)),
					this,
					SLOT(fogDisplayedUpdated(const bool)));
}
コード例 #2
0
void SporadicMeteorMgr::draw(StelCore* core)
{
	if (!m_flagShow || !core->getSkyDrawer()->getFlagHasAtmosphere())
	{
		return;
	}

	LandscapeMgr* landmgr = GETSTELMODULE(LandscapeMgr);
	if (landmgr->getFlagAtmosphere() && landmgr->getLuminance() > 5.f)
	{
		return;
	}

	// step through and draw all active meteors
	StelPainter sPainter(core->getProjection(StelCore::FrameAltAz));
	foreach (SporadicMeteor* m, activeMeteors)
	{
		m->draw(core, sPainter);
	}
コード例 #3
0
ファイル: MeteorMgr.cpp プロジェクト: incadoi/stellarium
void MeteorMgr::draw(StelCore* core)
{
	if (!flagShow)
		return;
	
	LandscapeMgr* landmgr = (LandscapeMgr*)StelApp::getInstance().getModuleMgr().getModule("LandscapeMgr");
	if (landmgr->getFlagAtmosphere() && landmgr->getLuminance()>5)
		return;

	StelPainter sPainter(core->getProjection(StelCore::FrameAltAz));
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	glEnable(GL_BLEND);
	sPainter.enableTexture2d(false);

	// step through and draw all active meteors
	for (std::vector<Meteor*>::iterator iter = active.begin(); iter != active.end(); ++iter)
	{
		(*iter)->draw(core, sPainter);
	}
}