Skip to content

Commit 7d70b31

Browse files
author
RubioJr9
committed
Fixed bug with auto rotate
1 parent 3522f58 commit 7d70b31

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Interface/Modules/Render/ES/SRCamera.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,13 @@ namespace SCIRun {
205205
//----------------------------------------------------------------------------------------------
206206
void SRCamera::tryAutoRotate()
207207
{
208-
mArcLookAt->doReferenceDown(lastMousePos);
209-
mArcLookAt->doRotation(lastMousePos + autoRotateVec);
210-
setClippingPlanes();
208+
const static double epsilon = 0.02e-12;
209+
if (glm::length(autoRotateVec) > epsilon)
210+
{
211+
mArcLookAt->doReferenceDown(lastMousePos);
212+
mArcLookAt->doRotation(lastMousePos + autoRotateVec);
213+
setClippingPlanes();
214+
}
211215
}
212216

213217
//----------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)