Page MenuHomePhabricator

Rotation operation in mitkGeometry3D does nothing for |angle| > 360°
Closed, ResolvedPublic

Description

the mitk::Geometry3D::ExecuteOperation() in case of opROTATE cuts off any rotation with an angle not within [-360, 360]. Consider the code lines

309: angle = (angle < -360) ? -360 : angle;
310: angle = (angle > 360) ? 360 : angle;

Is this the desired behaviour?

Event Timeline

Adding Jochen to 'CC' since he has added this code ( see rev. 2286 ).

I think both lines can be removed completely, since the rotation matrix is the same for 'angle' and 'k * 360 + angle'.

Date: Mon Apr 19 14:28:49 2004 CEST (6 years ago)

<-- This says it all. I have no idea why I did this back then.

I was implementing the AffineInteractor that is used to move, rotate and scale BaseData objects using the mouse (mostly used on BoundingObjects, e.g. in the ImageCropper view. If this still works with your change, then change it.

Translating, scaling and rotating seems to work without them just fine. I am going to delete them.

[SVN revision 22847]
FIX (#3981): Removing capping of rotations