From 3916b60702abf416c04a3dae2e62ca556b40a082 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Tue, 11 Sep 2007 12:25:12 +0000 Subject: Use angle step from prefs for rotation of PLs; Alt+parentheses rotate PLs by (constant) small amount (bzr r3720) --- src/perspective3d.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/perspective3d.cpp') diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp index db4f564c7..3c7529c16 100644 --- a/src/perspective3d.cpp +++ b/src/perspective3d.cpp @@ -204,12 +204,13 @@ Perspective3D::set_infinite_direction (Box3D::Axis axis, NR::Point const dir) } void -Perspective3D::rotate (Box3D::Axis const axis, double const angle) +Perspective3D::rotate (Box3D::Axis const axis, double const angle, bool const alt_pressed) { Box3D::VanishingPoint *vp = get_vanishing_point (axis); if (!vp->is_finite()) { + double add_value = angle; double a = NR::atan2 (vp->v_dir) * 180/M_PI; - a += angle; + a += alt_pressed ? 0.5 * ((angle > 0 ) - (angle < 0)) : angle; // the r.h.s. yields +/-0.5 or angle a *= M_PI/180; this->set_infinite_direction (axis, NR::Point (cos (a), sin (a))); } -- cgit v1.2.3