Skip to content

Commit 7326ee6

Browse files
author
Tark Patel
committed
Fixed arcball issuses. Reverted last commit
1 parent 7d70b31 commit 7326ee6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/Externals/spire/arc-ball/ArcBall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ glm::quat ArcBall::quatFromUnitSphere(const glm::vec3& from, const glm::vec3& to
101101
//TODO: check if cross is 0 before normalize. Crashes on Windows
102102
auto c = glm::cross(from, to);
103103
if (c == glm::vec3(0, 0, 0))
104-
return {};
104+
return glm::quat(1.0, 0.0, 0.0, 0.0);
105105

106106
glm::vec3 axis = glm::normalize(c);
107107

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,9 @@ namespace SCIRun {
205205
//----------------------------------------------------------------------------------------------
206206
void SRCamera::tryAutoRotate()
207207
{
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-
}
208+
mArcLookAt->doReferenceDown(lastMousePos);
209+
mArcLookAt->doRotation(lastMousePos + autoRotateVec);
210+
setClippingPlanes();
215211
}
216212

217213
//----------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)