本文整理汇总了C++中klayge::UISlider类的典型用法代码示例。如果您正苦于以下问题:C++ UISlider类的具体用法?C++ UISlider怎么用?C++ UISlider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UISlider类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LightDensityHandler
void CausticsMapApp::LightDensityHandler(KlayGE::UISlider const & sender)
{
float density_min = 1000.0f;
float density_max = 20000.0f;
int min_val, max_val;
sender.GetRange(min_val, max_val);
light_density_ = (static_cast<float>(sender.GetValue()) - min_val) / (max_val - min_val) * (density_max - density_min) + density_min;
}
开发者ID:BitYorkie,项目名称:KlayGE,代码行数:10,代码来源:CausticsMap.cpp
示例2: PointSizeHandler
void CausticsMapApp::PointSizeHandler(KlayGE::UISlider const & sender)
{
float pt_min = 0.01f;
float pt_max = 0.1f;
int min_val, max_val;
sender.GetRange(min_val, max_val);
point_size_ = (static_cast<float>(sender.GetValue()) - min_val) / (max_val - min_val) * (pt_max - pt_min) + pt_min;
}
开发者ID:BitYorkie,项目名称:KlayGE,代码行数:10,代码来源:CausticsMap.cpp
示例3: RefractIndexHandler
//UI Handler
void CausticsMapApp::RefractIndexHandler(KlayGE::UISlider const & sender)
{
float idx_min = 1.0f;
float idx_max = 2.0f;
int min_val, max_val;
sender.GetRange(min_val, max_val);
refract_idx_ = (static_cast<float>(sender.GetValue()) - min_val) / (max_val - min_val) * (idx_max - idx_min) + idx_min;
}
开发者ID:BitYorkie,项目名称:KlayGE,代码行数:11,代码来源:CausticsMap.cpp
示例4: NumLightsChangedHandler
void DeferredRenderingApp::NumLightsChangedHandler(KlayGE::UISlider const & sender)
{
int num_lights = sender.GetValue();
for (size_t i = num_lights; i < particle_lights_.size(); ++ i)
{
particle_lights_[i]->DelFromSceneManager();
particle_light_srcs_[i]->DelFromSceneManager();
}
size_t old_size = particle_lights_.size();
particle_lights_.resize(num_lights);
particle_light_srcs_.resize(num_lights);
for (size_t i = old_size; i < particle_lights_.size(); ++ i)
{
particle_lights_[i] = MakeSharedPtr<PointLightSource>();
particle_lights_[i]->Attrib(LightSource::LSA_NoShadow);
particle_lights_[i]->Falloff(float3(1, 0, 1));
particle_lights_[i]->AddToSceneManager();
particle_light_srcs_[i] = MakeSharedPtr<SceneObjectLightSourceProxy>(particle_lights_[i]);
checked_pointer_cast<SceneObjectLightSourceProxy>(particle_light_srcs_[i])->Scaling(0.1f, 0.1f, 0.1f);
particle_light_srcs_[i]->AddToSceneManager();
}
std::wostringstream stream;
stream << L"# lights: " << num_lights;
dialog_->Control<UIStatic>(id_num_lights_static_)->SetText(stream.str());
}
开发者ID:Chenmxs,项目名称:KlayGE,代码行数:30,代码来源:DeferredRendering.cpp
示例5: ILScaleChangedHandler
void GlobalIlluminationApp::ILScaleChangedHandler(KlayGE::UISlider const & sender)
{
il_scale_ = sender.GetValue() / 10.0f;
deferred_rendering_->IndirectScale(il_scale_);
std::wostringstream stream;
stream << L"Scale: " << il_scale_ << " x";
dialog_->Control<UIStatic>(id_il_scale_static_)->SetText(stream.str());
}
开发者ID:xdzj,项目名称:KlayGE,代码行数:9,代码来源:GlobalIllumination.cpp
示例6: InsideChangedHandler
void TessellationApp::InsideChangedHandler(KlayGE::UISlider const & sender)
{
tess_factor_.w() = sender.GetValue() / 10.0f;
checked_pointer_cast<TriangleObject>(polygon_)->TessFactors(tess_factor_);
std::wostringstream stream;
stream << L"Inside: " << tess_factor_.w();
dialog_->Control<UIStatic>(id_inside_static_)->SetText(stream.str());
}
开发者ID:iankona,项目名称:KlayGE,代码行数:9,代码来源:Tessellation.cpp
示例7: ScaleChangedHandler
void DetailedSurfaceApp::ScaleChangedHandler(KlayGE::UISlider const & sender)
{
height_scale_ = sender.GetValue() / 100.0f;
checked_pointer_cast<PolygonObject>(polygon_)->HeightScale(height_scale_);
std::wostringstream stream;
stream << L"Scale: " << height_scale_;
dialog_->Control<UIStatic>(id_scale_static_)->SetText(stream.str());
}
开发者ID:Chenmxs,项目名称:KlayGE,代码行数:9,代码来源:DetailedSurface.cpp
示例8: TranslucencyStrengthChangedHandler
void SSSSSApp::TranslucencyStrengthChangedHandler(KlayGE::UISlider const & sender)
{
float strength = static_cast<float>(sender.GetValue());
deferred_rendering_->TranslucencyStrength(strength);
std::wostringstream stream;
stream << L"Translucency strength: " << strength;
dialog_params_->Control<UIStatic>(id_translucency_strength_static_)->SetText(stream.str());
}
开发者ID:qioixiy,项目名称:KlayGE,代码行数:9,代码来源:SSSSS.cpp
示例9: SSSCorrectionChangedHandler
void SSSSSApp::SSSCorrectionChangedHandler(KlayGE::UISlider const & sender)
{
float correction = sender.GetValue() * 0.1f;
deferred_rendering_->SSSCorrection(correction);
std::wostringstream stream;
stream << L"SSS Correction: " << correction;
dialog_params_->Control<UIStatic>(id_sss_correction_static_)->SetText(stream.str());
}
开发者ID:qioixiy,项目名称:KlayGE,代码行数:9,代码来源:SSSSS.cpp
示例10: SSSStrengthChangedHandler
void SSSSSApp::SSSStrengthChangedHandler(KlayGE::UISlider const & sender)
{
float strength = sender.GetValue() * 0.1f;
deferred_rendering_->SSSStrength(strength);
std::wostringstream stream;
stream << L"SSS strength: " << strength;
dialog_params_->Control<UIStatic>(id_sss_strength_static_)->SetText(stream.str());
}
开发者ID:qioixiy,项目名称:KlayGE,代码行数:9,代码来源:SSSSS.cpp
示例11: MaxSampleNumHandler
void ScreenSpaceReflectionApp::MaxSampleNumHandler(KlayGE::UISlider const & sender)
{
int32_t sample_num = sender.GetValue();
if (teapot_)
{
checked_pointer_cast<ReflectMesh>(teapot_->GetRenderable())->MaxSamples(sample_num);
std::wostringstream oss;
oss << "Max Samples: " << sample_num;
parameter_dialog_->Control<UIStatic>(id_max_sample_num_static_)->SetText(oss.str());
}
}
开发者ID:iankona,项目名称:KlayGE,代码行数:12,代码来源:Reflection.cpp
示例12: ScaleFactorChangedHandler
void ShadowCubeMap::ScaleFactorChangedHandler(KlayGE::UISlider const & sender)
{
esm_scale_factor_ = static_cast<float>(sender.GetValue());
for (size_t i = 0; i < scene_objs_.size(); ++ i)
{
checked_pointer_cast<OccluderMesh>(scene_objs_[i]->GetRenderable())->ScaleFactor(esm_scale_factor_);
}
std::wostringstream stream;
stream << L"Scale Factor: " << esm_scale_factor_;
dialog_->Control<UIStatic>(id_scale_factor_static_)->SetText(stream.str());
}
开发者ID:iankona,项目名称:KlayGE,代码行数:12,代码来源:ShadowCubeMap.cpp
示例13: DensityHandler
void AtmosphericScatteringApp::DensityHandler(KlayGE::UISlider const & sender)
{
float value = sender.GetValue() / 100000.0f;
checked_pointer_cast<PlanetMesh>(planet_->GetRenderable())->Density(value);
checked_pointer_cast<AtmosphereMesh>(atmosphere_->GetRenderable())->Density(value);
}
开发者ID:dgkae,项目名称:KlayGE,代码行数:6,代码来源:AtmosphericScattering.cpp
示例14: AtmosphereTopHandler
void AtmosphericScatteringApp::AtmosphereTopHandler(KlayGE::UISlider const & sender)
{
float value = 1 + sender.GetValue() / 1000.0f;
checked_pointer_cast<AtmosphereMesh>(atmosphere_->GetRenderable())->AtmosphereTop(value);
}
开发者ID:dgkae,项目名称:KlayGE,代码行数:5,代码来源:AtmosphericScattering.cpp
注:本文中的klayge::UISlider类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论