From: Matt Keeter Date: Mon, 24 Mar 2014 23:49:11 +0000 (-0400) Subject: Reset camera parameters after loading model X-Git-Tag: v0.9.0~4^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=25a7138328a2b54bc1476621bbc97ef37a65d858;p=fstl Reset camera parameters after loading model --- diff --git a/src/canvas.cpp b/src/canvas.cpp index 15624da..dd645a5 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -30,6 +30,12 @@ void Canvas::load_mesh(Mesh* m) pow(m->xmax() - m->xmin(), 2) + pow(m->ymax() - m->ymin(), 2) + pow(m->zmax() - m->zmin(), 2)); + + // Reset other camera parameters + zoom = 1; + yaw = 0; + tilt = 90; + update(); delete m;