Skip to content

Slow mouse rotation compared to previous release #119

@tpikonen

Description

@tpikonen

The 'arc-ball' mouse control PR (#99) had the side effect of slowing down the mouse rotation by a large factor. I liked the fast rotation behavior of the previous release (0.10.0), so I fixed it by this trivial patch:

diff --git a/src/canvas.cpp b/src/canvas.cpp
index ff9f3ec..7f061e0 100644
--- a/src/canvas.cpp
+++ b/src/canvas.cpp
@@ -441,7 +441,7 @@ void Canvas::calcArcballTransform(QPointF p1, QPointF p2) {
     double angle = acos(std::min(1.0f,QVector3D::dotProduct(v1, v2))) * 180.0 / M_PI;

     // apply transform
-    currentTransform.rotate(angle,v1xv2Obj);
+    currentTransform.rotate(5.0*angle,v1xv2Obj);
 }

 void Canvas::mouseMoveEvent(QMouseEvent* event)

The factor 5.0 used here is not quite as fast as the previous version, but IMO better than the current master.

Should this change made (I can make a PR out of this), or should the acceleration factor be made configurable? Maybe not since fstl is currently nicely configuration-free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions