Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
CameraPane.java
....@@ -37,7 +37,6 @@
3737 static boolean[] selectedstack = new boolean[65536];
3838 static int materialdepth = 0;
3939
40
- static boolean DEBUG = false;
4140 static boolean FRUSTUM = false; // still bogus true; // frustum culling
4241
4342 // camera change fix
....@@ -2267,7 +2266,7 @@
22672266
22682267 void ToggleDebug()
22692268 {
2270
- DEBUG ^= true;
2269
+ Globals.DEBUG ^= true;
22712270 }
22722271
22732272 void ToggleLookAt()
....@@ -11459,6 +11458,24 @@
1145911458
1146011459 static boolean zoomonce = false;
1146111460
11461
+ void CreateSelectedPoint()
11462
+ {
11463
+ if (selectedpoint == null)
11464
+ {
11465
+ debugpointG = new Sphere();
11466
+ debugpointP = new Sphere();
11467
+ debugpointC = new Sphere();
11468
+ debugpointR = new Sphere();
11469
+
11470
+ selectedpoint = new Superellipsoid();
11471
+
11472
+ for (int i=0; i<8; i++)
11473
+ {
11474
+ debugpoints[i] = new Sphere();
11475
+ }
11476
+ }
11477
+ }
11478
+
1146211479 void DrawObject(GL gl, boolean draw)
1146311480 {
1146411481 //System.out.println("DRAW OBJECT " + mouseDown);
....@@ -11539,8 +11556,9 @@
1153911556
1154011557 if (DrawMode() == DEFAULT)
1154111558 {
11542
- if (DEBUG)
11559
+ if (Globals.DEBUG)
1154311560 {
11561
+ CreateSelectedPoint();
1154411562 float radius = 0.05f;
1154511563 if (selectedpoint.radius != radius)
1154611564 {
....@@ -14902,8 +14920,14 @@
1490214920 RevertCamera();
1490314921 repaint();
1490414922 break;
14905
- case 'L':
1490614923 case 'l':
14924
+ lightMode ^= true;
14925
+ Globals.lighttouched = true;
14926
+ manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera;
14927
+ targetLookAt.set(manipCamera.lookAt);
14928
+ repaint();
14929
+ break;
14930
+ case 'L':
1490714931 if (lightMode)
1490814932 {
1490914933 lightMode = false;
....@@ -15050,16 +15074,14 @@
1505015074 kompactbit = 6;
1505115075 break;
1505215076 case ' ':
15053
- lightMode ^= true;
15054
- Globals.lighttouched = true;
15055
- manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera;
15056
- targetLookAt.set(manipCamera.lookAt);
15077
+ ObjEditor.theFrame.ToggleFullScreen();
1505715078 repaint();
1505815079 break;
1505915080 //case '`' :
1506015081 case ESC:
1506115082 RENDERPROGRAM += 1;
1506215083 RENDERPROGRAM %= 3;
15084
+
1506315085 repaint();
1506415086 break;
1506515087 case 'Z':
....@@ -17235,23 +17257,15 @@
1723517257 int AAbuffersize = 0;
1723617258
1723717259 //double[] selectedpoint = new double[3];
17238
- static Superellipsoid selectedpoint = new Superellipsoid();
17260
+ static Superellipsoid selectedpoint;
1723917261 static Sphere previousselectedpoint = null;
17240
- static Sphere debugpointG = new Sphere();
17241
- static Sphere debugpointP = new Sphere();
17242
- static Sphere debugpointC = new Sphere();
17243
- static Sphere debugpointR = new Sphere();
17262
+ static Sphere debugpointG;
17263
+ static Sphere debugpointP;
17264
+ static Sphere debugpointC;
17265
+ static Sphere debugpointR;
1724417266
1724517267 static Sphere debugpoints[] = new Sphere[8];
1724617268
17247
- static
17248
- {
17249
- for (int i=0; i<8; i++)
17250
- {
17251
- debugpoints[i] = new Sphere();
17252
- }
17253
- }
17254
-
1725517269 static void InitPoints(float radius)
1725617270 {
1725717271 for (int i=0; i<8; i++)