X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fcameracontroller.cpp;h=6b98f3dba1bb32cda7aed57acc4bad688ce42a02;hb=cb222b6df855da4196a331c5b9859750c4321fa0;hp=bd7edbb530d540e73ac32296b80c6c57a3106180;hpb=61da962442ae528bba9c66fa0c09427b53a4cbe0;p=r2c2.git diff --git a/source/designer/cameracontroller.cpp b/source/designer/cameracontroller.cpp index bd7edbb..6b98f3d 100644 --- a/source/designer/cameracontroller.cpp +++ b/source/designer/cameracontroller.cpp @@ -1,6 +1,6 @@ /* $Id$ -This file is part of the MSP Märklin suite +This file is part of R²C² Copyright © 2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -12,7 +12,7 @@ Distributed under the GPL using namespace std; using namespace Msp; -using namespace Marklin; +using namespace R2C2; CameraController::CameraController(Designer &d, Graphics::EventSource &es, GL::Camera &c): designer(d), @@ -83,7 +83,13 @@ void CameraController::adjust_distance(float delta) { const GL::Vector3 &pos = camera.get_position(); const GL::Vector3 &look = camera.get_look_direction(); + float dist = get_distance(); + float low = designer.get_layout().get_catalogue().get_gauge()*5; + if(dist+delta