Normand Briere
2019-06-11 d0dc7ff35d71919d503ae35592478b173cf3cfd3
cSpring.java
....@@ -543,13 +543,13 @@
543543 }
544544
545545 // serial lost
546
- void DrawNode0(CameraPane display)
546
+ void DrawNode0(iCameraPane display)
547547 {
548548 super.DrawNode(display, null, false);
549549 }
550550
551551
552
- void DrawNode/*notused*/(CameraPane display, Object3D /*Composite*/ root, boolean selected)
552
+ void DrawNode/*notused*/(iCameraPane display, Object3D /*Composite*/ root, boolean selected)
553553 {
554554 // assert displaylist == -1;
555555
....@@ -565,7 +565,7 @@
565565 // }
566566
567567 //new Exception().printStackTrace();
568
- GL gl = display.GetGL(); // getGL();
568
+ GL gl = display.GetGL0(); // getGL();
569569
570570 //gl.glDisable(GL.GL_LIGHTING);
571571
....@@ -1208,7 +1208,10 @@
12081208 }
12091209
12101210 if (edges.size()%2 != 0)
1211
+ {
1212
+ new Exception().printStackTrace();
12111213 System.exit(0);
1214
+ }
12121215 }
12131216
12141217 // if (clearsprings)
....@@ -1516,7 +1519,10 @@
15161519 second = springs.get((i+1)%springs.size());
15171520
15181521 if (first == second)
1522
+ {
1523
+ new Exception().printStackTrace();
15191524 System.exit(0);
1525
+ }
15201526
15211527 temp.set(first.GetOther(this).position);
15221528 temp.sub(position);
....@@ -1646,7 +1652,10 @@
16461652 Spring second = springs.get((i+1)%springs.size());
16471653
16481654 if (first == second)
1655
+ {
1656
+ new Exception().printStackTrace();
16491657 System.exit(0);
1658
+ }
16501659
16511660 temp.set(first.GetOther(this).position);
16521661 temp.sub(position);
....@@ -1715,7 +1724,7 @@
17151724
17161725 // Phys.matrix.Transform(normal);
17171726
1718
- if (position instanceof Vertex)
1727
+ if (position instanceof Vertex && ((Vertex)position).norm != null)
17191728 ((Vertex)position).norm.set(normal.x,normal.y,normal.z);
17201729 }
17211730
....@@ -3289,6 +3298,7 @@
32893298
32903299 if (N2.mass == Float.MAX_VALUE)
32913300 {
3301
+ new Exception().printStackTrace();
32923302 System.exit(0);
32933303 magnitude *= solidity; // * K;
32943304