Ejemplo n.º 1
0
void AutomaticGraphicsLevelManager::Config_Enabled(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	if (variable.is_bool() && static_cast<bool>(variable)) {
		setEnabled(true);
	} else {
		setEnabled(false);
	}
}
Ejemplo n.º 2
0
void AuthoringManager::config_AuthoringVisualizations(const std::string& section, const std::string&, varconf::Variable& variable)
{
	if (variable.is_bool()) {
		if (static_cast<bool> (variable)) {
			displayAuthoringVisualization();
		} else {
			hideAuthoringVisualization();
		}
	}
}
Ejemplo n.º 3
0
void ShadowCameraSetup::Config_ShadowUseAggressiveFocusRegion(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	try {
		if (variable.is_bool()) {
			S_LOG_VERBOSE("Setting shadow use aggressive focus region: " << static_cast<bool>(variable));
			mPssmSetup->setUseAggressiveFocusRegion(static_cast<bool>(variable));
		}
	} catch (const std::exception& ex) {
		S_LOG_FAILURE("Error when setting shadow use aggressive focus region." << ex);
	}
}
Ejemplo n.º 4
0
void ShadowCameraSetup::Config_ShadowRenderBackfaces(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	try {
		if (variable.is_bool()) {
			S_LOG_VERBOSE("Setting shadow render back faces: " << static_cast<bool>(variable));
			mSceneMgr.setShadowCasterRenderBackFaces(static_cast<bool>(variable));
		}
	} catch (const std::exception& ex) {
		S_LOG_FAILURE("Error when setting shadow render back faces." << ex);
	}

}
Ejemplo n.º 5
0
void Input::Config_CatchMouse(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	try {
		if (variable.is_bool()) {
			bool enabled = static_cast<bool> (variable);
			if (enabled) {
				mMouseGrabbingRequested = true;
			} else {
				setMouseGrab(false);
			}
		}
	} catch (const std::exception& ex) {
		S_LOG_FAILURE("Error when changing mouse grabbing." << ex);
	}
}
Ejemplo n.º 6
0
void World::Config_Foliage(const std::string& section, const std::string& key, varconf::Variable& variable)
{
  if (variable.is_bool() && static_cast<bool>(variable)) {
    if (!mFoliage) {
      //create the foliage
      mFoliage = new Environment::Foliage(*mTerrainManager);
      EventFoliageCreated.emit();
      mFoliageInitializer = new DelayedFoliageInitializer(*mFoliage, mView, 1000, 15000);
    }
  } else {
    delete mFoliage;
    mFoliage = 0;
    delete mFoliageInitializer;
    mFoliageInitializer = 0;
  }

}
Ejemplo n.º 7
0
void World::Config_Foliage(const std::string& section, const std::string& key, varconf::Variable& variable, GraphicalChangeAdapter& graphicalChangeAdapter)
{
	if (variable.is_bool() && static_cast<bool>(variable)) {
		if (!mFoliage) {
			//create the foliage
			mFoliage = new Environment::Foliage(*mTerrainManager);
			EventFoliageCreated.emit();
			mFoliageInitializer = new DelayedFoliageInitializer(sigc::bind(sigc::mem_fun(*this, &World::initializeFoliage), sigc::ref(graphicalChangeAdapter)), mView, 1000, 15000);
		}
	} else {
		delete mFoliageDetailManager;
		mFoliageDetailManager = 0;
		delete mFoliageInitializer;
		mFoliageInitializer = 0;
		delete mFoliage;
		mFoliage = 0;
	}
}
Ejemplo n.º 8
0
void CameraSettings::Config_InvertCamera(const std::string& /*section*/, const std::string& /*key*/, varconf::Variable& variable)
{
    if (variable.is_bool()) {
        mInvertCamera = static_cast<bool>(variable);
    }
}