Normand Briere
2019-06-11 d0dc7ff35d71919d503ae35592478b173cf3cfd3
cSpring.java
....@@ -10,7 +10,7 @@
1010
1111 boolean IsStatic()
1212 {
13
- return !(live && (CameraPane.isLIVE() || CameraPane.waslive));
13
+ return !(live && (Globals.isLIVE() || CameraPane.waslive));
1414 }
1515
1616 void Revert()
....@@ -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,11 +565,11 @@
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
572
- if (display.drawMode == display.SHADOW)
572
+ if (display.DrawMode() == display.SHADOW)
573573 {
574574 gl.glDisable(gl.GL_CULL_FACE);
575575 }
....@@ -762,7 +762,7 @@
762762 gl.glEnd();
763763 gl.glEnable(GL.GL_LIGHTING);
764764 /**/
765
- if (display.CULLFACE)
765
+ if (display.BackFaceCullMode())
766766 {
767767 gl.glEnable(gl.GL_CULL_FACE);
768768 }
....@@ -775,7 +775,7 @@
775775 // displaylist = 0; // june 2013 -1;
776776
777777 //System.out.println("DRAW " + display.drawMode);
778
- if (live && display.isLIVE() && display.drawMode == display.DEFAULT)
778
+ if (live && Globals.isLIVE() && display.DrawMode() == display.DEFAULT)
779779 {
780780 //System.out.println("UPDATE");
781781 Phys.update();
....@@ -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