From c60a1ad4f6aa4904e80280586b440a584b5ff061 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 22 Apr 2019 15:17:45 -0400
Subject: [PATCH] Refactoring phase 2

---
 cMesh.java |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/cMesh.java b/cMesh.java
index 24ad433..863e918 100644
--- a/cMesh.java
+++ b/cMesh.java
@@ -355,7 +355,9 @@
         //        DynamicNode handle = new DynamicNode(center.x, center.y, center.z, 0 /*0 , 1 or Float.MAX_VALUE*/, 0);
         //        Phys.addHandle(handle);
                 
-            for (int k=Phys.allNodes.size(); --k>=0;) // warning: "add handle" adds a node
+            int size = Phys.allNodes.size();
+            
+            for (int k=0; k < size; k++) // warning: "add handle" adds a node
             {
                 DynamicNode dn = Phys.allNodes.get(k);
                 DynamicNode handle = new DynamicNode(dn.position.x, dn.position.y, dn.position.z, 0 /*0 , 1 or Float.MAX_VALUE*/, 0);
@@ -402,8 +404,8 @@
         if (ref == null)
             return;
         
-        GraphreeD.epsequal = IsEpsEqual();
-        GraphreeD.linkUV = IsLinkUV();
+        GrafreeD.epsequal = IsEpsEqual();
+        GrafreeD.linkUV = IsLinkUV();
         
 //        BoundaryRep oldrep = transientrep;
         
@@ -417,7 +419,7 @@
         Object3D obj = ref.GetObject();
         
         // may 2014: side-effect with UVs!!
-        obj = (Object3D) GraphreeD.clone(obj);
+        obj = (Object3D) GrafreeD.clone(obj);
         
         merge(obj);
 
@@ -427,7 +429,7 @@
         bRep.Trim(false, false,false,false,false);
             System.out.println("------> TRIM " + ref + "; #vertices = " + bRep.VertexCount() + "; #faces = " + bRep.FaceCount());
 
-        GraphreeD.epsequal = false;
+        GrafreeD.epsequal = false;
 
         if (transientrep != null && bRep.VertexCount() == transientrep.VertexCount())
         {
@@ -468,7 +470,7 @@
         }
         else
             // geometry is merged...
-            refcopy = (BoundaryRep) GraphreeD.clone(transientrep);
+            refcopy = (BoundaryRep) GrafreeD.clone(transientrep);
     }
     
     transient cVector minima = new cVector();
@@ -482,7 +484,7 @@
     }
     
     
-    void DrawNode(CameraPane display, Object3D /*Composite*/ root, boolean selected) // ??
+    void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ??
     {
 // ??????        if (size() > 0)
 //        {
@@ -642,7 +644,7 @@
             gl.glEnable(gl.GL_LIGHTING);
         }
         
-        if (live && display.isLIVE() && display.drawMode == CameraPane.DEFAULT)
+        if (live && Globals.isLIVE() && display.DrawMode() == CameraPane.DEFAULT)
         {
         //System.out.println("UPDATE");
             if (Phys == null)

--
Gitblit v1.6.2