From 21ac57b36a9e3b909853c7d64ac29b7ad72490a3 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 02 Sep 2019 16:52:19 -0400
Subject: [PATCH] Figure panel.

---
 BoundaryRep.java |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/BoundaryRep.java b/BoundaryRep.java
index 79ff6fe..3d93ef4 100644
--- a/BoundaryRep.java
+++ b/BoundaryRep.java
@@ -686,6 +686,7 @@
     
     void RecomputeBasis(BoundaryRep other, double[][] toRoot, Vertex v)
     {
+        CameraPane.CreateSelectedPoint();
         CameraPane.selectedpoint.
             getAverage(cStatic.point1, true);
 
@@ -1003,6 +1004,7 @@
             
             v.closestsupport = -1;
             
+        CameraPane.CreateSelectedPoint();
         CameraPane.selectedpoint.
             getAverage(cStatic.point1, true);
 
@@ -1261,6 +1263,7 @@
         for (int wi = v0.weights.length; --wi>=0;)
             v[wi] = 0;
             
+        CameraPane.CreateSelectedPoint();
         CameraPane.selectedpoint.
             getAverage(cStatic.point1, true);
 
@@ -1398,6 +1401,7 @@
         v0.x = v0.y = v0.z = 0;
         v0.norm.x = v0.norm.y = v0.norm.z = 0;
             
+        CameraPane.CreateSelectedPoint();
         CameraPane.selectedpoint.
             getAverage(cStatic.point1, true);
 
@@ -2000,7 +2004,7 @@
                 // Warning: faster but dangerous
                 if (v.weights != null && v.weights[j]
                         // == 0)
-                        < 0.001 * v.totalweight)
+                        < 0.0001 * v.totalweight)
                 {
                     //testweight += v.weights[j-1];
                     continue;
@@ -4022,8 +4026,6 @@
                 //System.out.println("NEW = " + positions.length);
                 uvmap = new float[ta.getVertexCount() * 2];
                 
-                colors = new float[ta.getVertexCount()]; // * 3];
-
                 ta.getCoordinates(0, positions);
                 ta.getNormals(0, normals);
 //                ta.getColors(0, colors);
@@ -4031,6 +4033,14 @@
 
                 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
 
+                colors = null;
+//                colors = new float[ta.getVertexCount()]; // * 3];
+//
+//                for (int i=colors.length; --i>=0;)
+//                {
+//                        colors[i] = 1;
+//                }
+                
                 triangles = new int[ta.getVertexCount()];
 
                 for (int i = 0; i < triangles.length; i++)
@@ -4068,17 +4078,18 @@
                 positions = new float[3 * ga.getVertexCount()];
                 normals = new float[3 * ga.getVertexCount()];
                 uvmap = new float[2 * ga.getVertexCount()];
-                colors = new float[1 * ga.getVertexCount()];
 
                 tsa.getCoordinates(0, positions);
                 tsa.getNormals(0, normals);
                 tsa.getTextureCoordinates(0, 0, uvmap);
            //     tsa.getColors(0, colors);
-                
-                for (int i=colors.length; --i>=0;)
-                {
-                        colors[i] = 1;
-                }
+
+                colors = null;
+//                colors = new float[1 * ga.getVertexCount()];
+//                for (int i=colors.length; --i>=0;)
+//                {
+//                        colors[i] = 1;
+//                }
 
                 int stripcount = tsa.getNumStrips();
                 triangles = new int[stripcount];
@@ -4087,6 +4098,7 @@
                 stripified = true;
             } catch (ClassCastException e)
             {
+                // ??? aug 2019
                 TriangleArray ta = (TriangleArray) ga;
 
                 positions = new float[3 * ga.getVertexCount()];

--
Gitblit v1.6.2