本文整理汇总了C++中varconf::Variable::is_double方法的典型用法代码示例。如果您正苦于以下问题:C++ Variable::is_double方法的具体用法?C++ Variable::is_double怎么用?C++ Variable::is_double使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类varconf::Variable
的用法示例。
在下文中一共展示了Variable::is_double方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Config_FoliageDensity
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);
}
}
示例2: Config_FoliageFarDistance
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);
}
}
示例3: Config_LodBias
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);
}
}
示例4: Config_DefaultFps
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;
}
}
示例5: Config_DesiredFps
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;
}
}
}
示例6: Config_CloudCover
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));
}
}