From 1af7d3700724834e40ad8636bc9a56cdc3b19b15 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sat, 27 Jul 2019 11:52:38 -0400
Subject: [PATCH] New layout icons

---
 cSpring.java |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/cSpring.java b/cSpring.java
index 445f1ac..b5d339c 100644
--- a/cSpring.java
+++ b/cSpring.java
@@ -10,7 +10,7 @@
 
     boolean IsStatic()
     {
-        return !(live && (CameraPane.isLIVE() || CameraPane.waslive));
+        return !(live && (Globals.isLIVE() || CameraPane.waslive));
     }
     
     void Revert()
@@ -543,13 +543,13 @@
     }
 
     // serial lost
-    void DrawNode0(CameraPane display)
+    void DrawNode0(iCameraPane display)
     {
         super.DrawNode(display, null, false);
     }
 
     
-    void DrawNode/*notused*/(CameraPane display, Object3D /*Composite*/ root, boolean selected)
+    void DrawNode/*notused*/(iCameraPane display, Object3D /*Composite*/ root, boolean selected)
     {
 //        assert displaylist == -1;
 
@@ -565,11 +565,11 @@
 //        }
         
         //new Exception().printStackTrace();
-        GL gl = display.GetGL(); // getGL();
+        GL gl = display.GetGL0(); // getGL();
 
         //gl.glDisable(GL.GL_LIGHTING);
 
-        if (display.drawMode == display.SHADOW)
+        if (display.DrawMode() == display.SHADOW)
         {
             gl.glDisable(gl.GL_CULL_FACE);
         }
@@ -762,7 +762,7 @@
         gl.glEnd();
         gl.glEnable(GL.GL_LIGHTING);
         /**/
-        if (display.CULLFACE)
+        if (display.BackFaceCullMode())
         {
             gl.glEnable(gl.GL_CULL_FACE);
         }
@@ -775,7 +775,7 @@
 //        displaylist = 0; // june 2013 -1;
 
         //System.out.println("DRAW " + display.drawMode);
-        if (live && display.isLIVE() && display.drawMode == display.DEFAULT)
+        if (live && Globals.isLIVE() && display.DrawMode() == display.DEFAULT)
         {
             //System.out.println("UPDATE");
             Phys.update();
@@ -1208,7 +1208,10 @@
                 }
                 
                 if (edges.size()%2 != 0)
+                {
+                new Exception().printStackTrace();
                     System.exit(0);
+                }
             }
 
        //     if (clearsprings)
@@ -1516,7 +1519,10 @@
                     second = springs.get((i+1)%springs.size());
 
                     if (first == second)
+                    {
+                new Exception().printStackTrace();
                         System.exit(0);
+                    }
 
                     temp.set(first.GetOther(this).position);
                     temp.sub(position);
@@ -1646,7 +1652,10 @@
                 Spring second = springs.get((i+1)%springs.size());
                 
                 if (first == second)
+                {
+                    new Exception().printStackTrace();
                     System.exit(0);
+                }
                 
                 temp.set(first.GetOther(this).position);
                 temp.sub(position);
@@ -1715,7 +1724,7 @@
             
     //        Phys.matrix.Transform(normal);
             
-            if (position instanceof Vertex)
+            if (position instanceof Vertex && ((Vertex)position).norm != null)
                 ((Vertex)position).norm.set(normal.x,normal.y,normal.z);
         }
 
@@ -3289,6 +3298,7 @@
             
             if (N2.mass == Float.MAX_VALUE)
             {
+                    new Exception().printStackTrace();
                 System.exit(0);
                 magnitude *= solidity; // * K;
                 

--
Gitblit v1.6.2