diff options
Diffstat (limited to 'src/ui/modelview.cc')
-rwxr-xr-x | src/ui/modelview.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc index e4975a3..8069ac7 100755 --- a/src/ui/modelview.cc +++ b/src/ui/modelview.cc @@ -22,7 +22,7 @@ namespace ui { const float LIGHT_DISTANCE = -10.0f; -const float LIGHT_ATTENUATION = 0.2f; +const float LIGHT_ATTENUATION = 0.5f; ModelView::ModelView(Widget *parent) : Widget(parent) { @@ -50,7 +50,7 @@ void ModelView::print(const size_t indent) const con_print << aux::pad_left(marker, indent*2) << label() << " \"" << modelname() << "\"" << std::endl; } -void ModelView::clear() +void ModelView::reset() { set_background(false); @@ -66,9 +66,15 @@ void ModelView::clear() modelview_globebright = false; } +void ModelView::clear() +{ + reset(); + modelview_mode = Model; +} + void ModelView::set_globetexturename(const std::string & texturename, const bool bright, const std::string & coronaname) { - clear(); + reset(); modelview_globetexturename.assign(texturename); modelview_globecoronaname.assign(coronaname); modelview_globebright = bright; @@ -76,7 +82,7 @@ void ModelView::set_globetexturename(const std::string & texturename, const bool void ModelView::set_modelname(const std::string & modelname) { - clear(); + reset(); modelview_modelname.assign(modelname); } @@ -190,7 +196,7 @@ void ModelView::draw_globe() math::Vector3f(LIGHT_DISTANCE * reference_radius, 0, 0), math::Color(1.0f, 1.0f, 1.0f) ); - light->set_attenuation(LIGHT_ATTENUATION, LIGHT_ATTENUATION, 0.0f); + light->set_attenuation(0.0f, LIGHT_ATTENUATION, 0.0f); render::LightEnvironment lightenv; lightenv.add(light); @@ -290,7 +296,7 @@ void ModelView::draw_model() math::Vector3f(LIGHT_DISTANCE * reference_radius, 0, 0), math::Color(1.0f, 1.0f, 1.0f) ); - light->set_attenuation(LIGHT_ATTENUATION, LIGHT_ATTENUATION, 0.0f); + light->set_attenuation(0.0f, LIGHT_ATTENUATION, 0.0f); render::LightEnvironment lightenv; lightenv.add(light); |