]> git.tdb.fi Git - r2c2.git/commitdiff
Set depth clip in View3D::view_all
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 May 2014 09:18:18 +0000 (12:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 May 2014 10:35:28 +0000 (13:35 +0300)
source/3d/view.cpp

index b833605c87227951e798de68983bbaac46eead27..ef03c4b7139f42cdb7d357c7310c8d6fc09f85dd 100644 (file)
@@ -70,6 +70,7 @@ void View3D::view_all(bool tight)
        GL::Vector3 center = (minp+maxp)/2.0f;
        const GL::Vector3 &look = camera.get_look_direction();
        camera.set_position(center-look*dist);
+       camera.set_depth_clip(dist*0.02, dist*50);
 }
 
 void View3D::render()