.. | .. |
---|
37 | 37 | static boolean[] selectedstack = new boolean[65536]; |
---|
38 | 38 | static int materialdepth = 0; |
---|
39 | 39 | |
---|
40 | | - static boolean DEBUG = false; |
---|
41 | 40 | static boolean FRUSTUM = false; // still bogus true; // frustum culling |
---|
42 | 41 | |
---|
43 | 42 | // camera change fix |
---|
.. | .. |
---|
2267 | 2266 | |
---|
2268 | 2267 | void ToggleDebug() |
---|
2269 | 2268 | { |
---|
2270 | | - DEBUG ^= true; |
---|
| 2269 | + Globals.DEBUG ^= true; |
---|
2271 | 2270 | } |
---|
2272 | 2271 | |
---|
2273 | 2272 | void ToggleLookAt() |
---|
.. | .. |
---|
11459 | 11458 | |
---|
11460 | 11459 | static boolean zoomonce = false; |
---|
11461 | 11460 | |
---|
| 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 | + |
---|
11462 | 11479 | void DrawObject(GL gl, boolean draw) |
---|
11463 | 11480 | { |
---|
11464 | 11481 | //System.out.println("DRAW OBJECT " + mouseDown); |
---|
.. | .. |
---|
11539 | 11556 | |
---|
11540 | 11557 | if (DrawMode() == DEFAULT) |
---|
11541 | 11558 | { |
---|
11542 | | - if (DEBUG) |
---|
| 11559 | + if (Globals.DEBUG) |
---|
11543 | 11560 | { |
---|
| 11561 | + CreateSelectedPoint(); |
---|
11544 | 11562 | float radius = 0.05f; |
---|
11545 | 11563 | if (selectedpoint.radius != radius) |
---|
11546 | 11564 | { |
---|
.. | .. |
---|
14902 | 14920 | RevertCamera(); |
---|
14903 | 14921 | repaint(); |
---|
14904 | 14922 | break; |
---|
14905 | | - case 'L': |
---|
14906 | 14923 | 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': |
---|
14907 | 14931 | if (lightMode) |
---|
14908 | 14932 | { |
---|
14909 | 14933 | lightMode = false; |
---|
.. | .. |
---|
15050 | 15074 | kompactbit = 6; |
---|
15051 | 15075 | break; |
---|
15052 | 15076 | case ' ': |
---|
15053 | | - lightMode ^= true; |
---|
15054 | | - Globals.lighttouched = true; |
---|
15055 | | - manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera; |
---|
15056 | | - targetLookAt.set(manipCamera.lookAt); |
---|
| 15077 | + ObjEditor.theFrame.ToggleFullScreen(); |
---|
15057 | 15078 | repaint(); |
---|
15058 | 15079 | break; |
---|
15059 | 15080 | //case '`' : |
---|
15060 | 15081 | case ESC: |
---|
15061 | 15082 | RENDERPROGRAM += 1; |
---|
15062 | 15083 | RENDERPROGRAM %= 3; |
---|
| 15084 | + |
---|
15063 | 15085 | repaint(); |
---|
15064 | 15086 | break; |
---|
15065 | 15087 | case 'Z': |
---|
.. | .. |
---|
17235 | 17257 | int AAbuffersize = 0; |
---|
17236 | 17258 | |
---|
17237 | 17259 | //double[] selectedpoint = new double[3]; |
---|
17238 | | - static Superellipsoid selectedpoint = new Superellipsoid(); |
---|
| 17260 | + static Superellipsoid selectedpoint; |
---|
17239 | 17261 | 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; |
---|
17244 | 17266 | |
---|
17245 | 17267 | static Sphere debugpoints[] = new Sphere[8]; |
---|
17246 | 17268 | |
---|
17247 | | - static |
---|
17248 | | - { |
---|
17249 | | - for (int i=0; i<8; i++) |
---|
17250 | | - { |
---|
17251 | | - debugpoints[i] = new Sphere(); |
---|
17252 | | - } |
---|
17253 | | - } |
---|
17254 | | - |
---|
17255 | 17269 | static void InitPoints(float radius) |
---|
17256 | 17270 | { |
---|
17257 | 17271 | for (int i=0; i<8; i++) |
---|