From 22e8ab6479334206f97b0093f6c5ffd14610cce3 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 18 Aug 2019 20:30:44 -0400
Subject: [PATCH] More credits

---
 SwitchNode.java |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/SwitchNode.java b/SwitchNode.java
index 962a851..7189ebc 100644
--- a/SwitchNode.java
+++ b/SwitchNode.java
@@ -20,7 +20,7 @@
         {
             CreateMaterial();
             switchobject.get(0).bRep.SaveSupports();
-            bRep = (BoundaryRep) GraphreeD.clone(switchobject.get(0).bRep);
+            bRep = (BoundaryRep) Grafreed.clone(switchobject.get(0).bRep);
             switchobject.get(0).bRep.RestoreSupports();
         }
         
@@ -30,7 +30,7 @@
             Object3D par = duplicate.parent;
             duplicate.parent = null;
             duplicate.SaveSupports();
-            addChild((Object3D)GraphreeD.clone(duplicate));
+            addChild((Object3D)Grafreed.clone(duplicate));
             duplicate.parent = par;
             duplicate.RestoreSupports();
         }
@@ -41,12 +41,12 @@
             switchobject.count = 1; // hide
     }
     
-    transient boolean restarted;
+    //transient boolean restarted;
     transient int countspeed;
 
     transient boolean toggleneutral;
     
-    void DrawNode(CameraPane display, Object3D /*Composite*/ root, boolean selected)
+    void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected)
     {
         //System.err.println("Frame # " + frame);
         
@@ -57,9 +57,9 @@
             parent = super.parent;
             
         }
-        if (live && display.isLIVE() && display.drawMode == display.SHADOW)
+        if (live && Globals.isLIVE() && display.DrawMode() == display.SHADOW)
         {
-            if (countspeed == 0)
+            if (countspeed <= 0)
             {
                 countspeed = speed;
                 
@@ -92,15 +92,21 @@
                 
             }
             else
-                countspeed--;
+            {
+                if (CameraPane.FAST)
+                    countspeed -= CameraPane.STEP;
+                else
+                    countspeed--;
+            }
         }
         
         if (bRep == null)
         {
-            bRep = (BoundaryRep) GraphreeD.clone(switchobject.get(0).bRep);
+            // The switch mesh will be used to interpolate poaes (maybe).
+            bRep = (BoundaryRep)Grafreed.clone(switchobject.get(0).bRep);
         }
         
-        if (CameraPane.SUPPORT && display.drawMode == display.SHADOW)
+        if (CameraPane.SUPPORT && display.DrawMode() == display.SHADOW)
         {
             Update();
         }

--
Gitblit v1.6.2