From f924d3e00db476c06f55f3d5aaef307e17575340 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 13 May 2019 07:29:08 -0400
Subject: [PATCH] Transform children

---
 BoundaryRep.java |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/BoundaryRep.java b/BoundaryRep.java
index 14a7921..1781a47 100644
--- a/BoundaryRep.java
+++ b/BoundaryRep.java
@@ -172,16 +172,16 @@
             bufV = other.bufV;
             bufF = other.bufF;
 
-            positions = (float[]) GrafreeD.clone(other.positions);
-            normals = (float[]) GrafreeD.clone(other.normals);
-            colors = (float[]) GrafreeD.clone(other.colors);
-            uvmap = (float[]) GrafreeD.clone(other.uvmap);
-            triangles = (int[]) GrafreeD.clone(other.triangles);
+            positions = (float[]) Grafreed.clone(other.positions);
+            normals = (float[]) Grafreed.clone(other.normals);
+            colors = (float[]) Grafreed.clone(other.colors);
+            uvmap = (float[]) Grafreed.clone(other.uvmap);
+            triangles = (int[]) Grafreed.clone(other.triangles);
             
-            indices = (int[]) GrafreeD.clone(other.indices);
+            indices = (int[]) Grafreed.clone(other.indices);
 
-            vertices = (Vector<Vertex>) GrafreeD.clone(other.vertices);
-            faces = (Vector<Face>) GrafreeD.clone(other.faces);
+            vertices = (Vector<Vertex>) Grafreed.clone(other.vertices);
+            faces = (Vector<Face>) Grafreed.clone(other.faces);
         }
         else
         {
@@ -500,7 +500,7 @@
     static Vertex vertextemp = new Vertex(true);
     static Vertex vertextemp2 = new Vertex(true);
     
-    static double SEUIL = 0.1f; // 0.1 for rag doll; 0.07;
+    static double SEUIL = 0.05f; // 0.1 for rag doll; 0.07;
         
     // Compute weight of point w/r to this
     float ComputeWeight(Vertex v, double[][] toRoot, int k)
@@ -1518,7 +1518,7 @@
             InitFaceIndices();
         }
         
-        BoundaryRep rep = (BoundaryRep) GrafreeD.clone(this);
+        BoundaryRep rep = (BoundaryRep) Grafreed.clone(this);
         //float[] v = new float[100];
         
         for (int loops=1; --loops>=0;)
@@ -1548,7 +1548,7 @@
             InitFaceIndices();
         }
         
-        BoundaryRep rep = (BoundaryRep) GrafreeD.clone(this);
+        BoundaryRep rep = (BoundaryRep) Grafreed.clone(this);
         //float[] v = new float[100];
         
         for (int loops=10; --loops>=0;)
@@ -2670,7 +2670,7 @@
 
             if (Globals.framecount - lastsoundtime > 30) // 0.25 secs
             {
-                GrafreeD.wav.play((Math.random()+0.5)/Math.max(tmp.length2(),0.2)); //, 1);
+                Grafreed.wav.play((Math.random()+0.5)/Math.max(tmp.length2(),0.2)); //, 1);
 
                 lastsoundtime = Globals.framecount;
             }
@@ -3403,7 +3403,7 @@
                     k /= x*x + y*y;
                 }
                 else
-                    GrafreeD.Assert(z == 1);
+                    Grafreed.Assert(z == 1);
                 
                 if (k < 0)
                     k = 0;
@@ -3902,6 +3902,11 @@
                 tsa.getNormals(0, normals);
                 tsa.getTextureCoordinates(0, 0, uvmap);
            //     tsa.getColors(0, colors);
+                
+                for (int i=colors.length; --i>=0;)
+                {
+                        colors[i] = 1;
+                }
 
                 int stripcount = tsa.getNumStrips();
                 triangles = new int[stripcount];
@@ -6354,6 +6359,7 @@
     
     void InitWeights()
     {
+                new Exception().printStackTrace();
         System.exit(0);
         int n = 0;
         int b = 0;
@@ -8227,7 +8233,7 @@
         if (!trimmed)
             return;
         
-        GrafreeD.linkUV = false;
+        Grafreed.linkUV = false;
         
         try
         {

--
Gitblit v1.6.2