From ca18b25df2836c3fca86c028e975935ba11ea4fb Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 24 Mar 2003 18:14:10 +0000
Subject: [PATCH] temp fix of clipping planes so that we can zoom in more

---
 Graphics/Draw.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp
index f5e6b621d9..1ac1bbf353 100644
--- a/Graphics/Draw.cpp
+++ b/Graphics/Draw.cpp
@@ -1,4 +1,4 @@
-// $Id: Draw.cpp,v 1.37 2003-03-21 00:52:38 geuzaine Exp $
+// $Id: Draw.cpp,v 1.38 2003-03-24 18:14:10 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -136,11 +136,16 @@ void Orthogonalize(int x, int y)
   CTX.pixel_equiv_y =
     (CTX.vymax - CTX.vymin) / (CTX.viewport[3] - CTX.viewport[1]);
 
+  // We should have a look at how the scaling is done in "real" opengl
+  // applications (I guess they normalize the scene to fit in a 1x1x1
+  // box or something...). Nevertheless, this definition of the
+  // clipping planes should be OK in most cases (do we really zoom in
+  // more than 500 times the characteristic length of the structure?):
   if(CTX.ortho) {
-    glOrtho(CTX.vxmin, CTX.vxmax, CTX.vymin, CTX.vymax, 0, 100 * CTX.lc);
+    glOrtho(CTX.vxmin, CTX.vxmax, CTX.vymin, CTX.vymax, 0, 1000 * CTX.lc);
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
-    glTranslated(0.0, 0.0, -50 * CTX.lc);
+    glTranslated(0.0, 0.0, -500 * CTX.lc);
   }
   else {
     glFrustum(CTX.vxmin, CTX.vxmax, CTX.vymin, CTX.vymax, CTX.lc,
-- 
GitLab