void FoliageDetailManager::Config_FoliageDensity(const std::string&, const std::string&, varconf::Variable& variable)
{
	if (variable.is_double()) {
		float density = static_cast<double>(variable);
		setFoliageDensity(density / 100);
	}
}
void FoliageDetailManager::Config_FoliageFarDistance(const std::string&, const std::string&, varconf::Variable& variable)
{
	if (variable.is_double()) {
		float distanceFactor = static_cast<double>(variable);
		setFoliageDistance(distanceFactor / 100);
	}
}
Exemple #3
0
void LodLevelManager::Config_LodBias(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	if (variable.is_double()) {
		Ogre::Real lodBias = static_cast<double>(variable);
		setLodBiasAll(lodBias / 100.0f);
	}
}
Exemple #4
0
void ShadowCameraSetup::Config_ShadowFarDistance(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	try {
		if (variable.is_double()) {
			S_LOG_VERBOSE("Setting shadow far distance: " << static_cast<double>(variable));
			mSceneMgr.setShadowFarDistance(static_cast<double>(variable));
		}
	} catch (const std::exception& ex) {
		S_LOG_FAILURE("Error when setting shadow far distance." << ex);
	}
}
Exemple #5
0
void ShadowCameraSetup::Config_ShadowSplitPadding(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	try {
		if (variable.is_double()) {
			S_LOG_VERBOSE("Setting shadow split padding: " << static_cast<double>(variable));
			mPssmSetup->setSplitPadding(static_cast<double>(variable));
		}
	} catch (const std::exception& ex) {
		S_LOG_FAILURE("Error when setting shadow split padding." << ex);
	}
}
void AutomaticGraphicsLevelManager::Config_DefaultFps(const std::string& section, const std::string& key, varconf::Variable& variable)
{
	if (variable.is_double()) {
		int fps = static_cast<double>(variable);
		//If set to 0, the fps the manager tries to achieve is 60
		if (fps == 0.0f) {
			fps = 60.0f;
		}
		mDefaultFps = fps;
	}
}
Exemple #7
0
	void Config_DesiredFps(const std::string& section, const std::string& key, varconf::Variable& variable)
	{
		//Check for double, but cast to int. That way we'll catch all numbers.
		if (variable.is_double()) {
			mDesiredFps = static_cast<int>(variable);
			if (mDesiredFps != 0) {
				mMicrosecondsPerFrame = 1000000L / mDesiredFps;
			} else {
				mMicrosecondsPerFrame = 0;
			}
		}
	}
Exemple #8
0
void CaelumSky::Config_CloudCover(const std::string& section, const std::string& key, varconf::Variable& variable)
{
  if (variable.is_double() && mCaelumSystem->getCloudSystem()) {
    mCaelumSystem->getCloudSystem()->getLayer(0)->setCloudCover(static_cast<double>(variable));
  }
}
Exemple #9
0
void CameraSettings::Config_DegreesPerMouseUnit(const std::string& /*section*/, const std::string& /*key*/, varconf::Variable& variable)
{
    if (variable.is_double()) {
        mDegreesPerMouseUnit = static_cast<double>(variable);
    }
}