From ec1ab4278b2408d3b19083e530e0376f809cca44 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 22 Apr 2019 14:29:20 -0400
Subject: [PATCH] Fix drawSelf

---
 BoundaryRep.java |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/BoundaryRep.java b/BoundaryRep.java
index 9cf899c..655d595 100644
--- a/BoundaryRep.java
+++ b/BoundaryRep.java
@@ -790,7 +790,7 @@
             v.weights[k] = other.ComputeWeight(v, toRoot, k); // (float)(supportsize * normalweight * nz / Math.pow(tx*tx+ty*ty+tz*tz, 1));
             v.totalweight += v.weights[k];
             
-            if (CameraPane.CROWD)
+            if (Globals.CROWD)
             {
       //          System.out.print("weight = " + v.weights[k]);
       //          System.out.println("; totalweight = " + v.totalweight);
@@ -2668,11 +2668,11 @@
             tmp.set(v);
             tmp.sub(eye);
 
-            if (CameraPane.framecount - lastsoundtime > 30) // 0.25 secs
+            if (Globals.framecount - lastsoundtime > 30) // 0.25 secs
             {
                 GrafreeD.wav.play((Math.random()+0.5)/Math.max(tmp.length2(),0.2)); //, 1);
 
-                lastsoundtime = CameraPane.framecount;
+                lastsoundtime = Globals.framecount;
             }
             
             stepout = false;
@@ -4932,7 +4932,7 @@
                 //colors[i3 + 1] = cp.vertexOcclusion.g;
                 //colors[i3 + 2] = cp.vertexOcclusion.b;
 
-                if ((i % 1000) == 0 && i != 0)
+                if ((i % 100) == 0 && i != 0)
                 {
             CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
                     //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done");
@@ -4948,7 +4948,7 @@
             {
                 Vertex v = GetVertex(i);
                 
-                if (v.norm.x == 0 && v.norm.y == 0 && v.norm.z == 0)
+                if (v.norm == null || v.norm.x == 0 && v.norm.y == 0 && v.norm.z == 0)
                     continue;
 
                 from.set(v.x, v.y, v.z);
@@ -4964,7 +4964,7 @@
 
                 v.AO = cp.vertexOcclusion.r;
 
-                if ((i % 1000) == 0 && i != 0)
+                if ((i % 100) == 0 && i != 0)
                 {
             CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
                     //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done");
@@ -7230,7 +7230,8 @@
             {
                 if (f3.p == f0.p)
                 {
-                    assert(false);
+//                    assert(false);
+                    new Exception().printStackTrace();
                     f0.r = f3.q;
                 }
                 else

--
Gitblit v1.6.2