.. | .. |
---|
228 | 228 | void PushMatrix(double[][] matrix, int count) |
---|
229 | 229 | { |
---|
230 | 230 | matrixdepth++; |
---|
231 | | - // GraphreeD.tracein(matrix); |
---|
| 231 | + // GrafreeD.tracein(matrix); |
---|
232 | 232 | if (matrix == null) |
---|
233 | 233 | return; // Identity |
---|
234 | 234 | |
---|
.. | .. |
---|
253 | 253 | |
---|
254 | 254 | void PushMatrix(double[][] matrix) |
---|
255 | 255 | { |
---|
256 | | - // GraphreeD.tracein(matrix); |
---|
| 256 | + // GrafreeD.tracein(matrix); |
---|
257 | 257 | PushMatrix(matrix,1); |
---|
258 | 258 | } |
---|
259 | 259 | |
---|
260 | 260 | void PushMatrix() |
---|
261 | 261 | { |
---|
262 | | - // GraphreeD.tracein(null); |
---|
| 262 | + // GrafreeD.tracein(null); |
---|
263 | 263 | if (matrixdepth++ < MAXSTACK - 1) |
---|
264 | 264 | { |
---|
265 | 265 | currentGL.glPushMatrix(); |
---|
.. | .. |
---|
274 | 274 | { |
---|
275 | 275 | --matrixdepth; |
---|
276 | 276 | |
---|
277 | | - // GraphreeD.traceout(inverse); |
---|
| 277 | + // GrafreeD.traceout(inverse); |
---|
278 | 278 | if (inverse == null) |
---|
279 | 279 | return; // Identity |
---|
280 | 280 | |
---|
.. | .. |
---|
292 | 292 | |
---|
293 | 293 | void PopMatrix() |
---|
294 | 294 | { |
---|
295 | | - // GraphreeD.traceout(null); |
---|
| 295 | + // GrafreeD.traceout(null); |
---|
296 | 296 | // inverse == null?? |
---|
297 | 297 | if (--matrixdepth < MAXSTACK - 1) |
---|
298 | 298 | { |
---|
.. | .. |
---|
491 | 491 | System.err.println("LIVE = " + isLIVE()); |
---|
492 | 492 | |
---|
493 | 493 | if (!isLIVE()) // save sound |
---|
494 | | - GraphreeD.savesound = true; // wav.save(); |
---|
| 494 | + GrafreeD.savesound = true; // wav.save(); |
---|
495 | 495 | // else |
---|
496 | 496 | repaint(); // start loop // may 2013 |
---|
497 | 497 | } |
---|
.. | .. |
---|
2000 | 2000 | */ |
---|
2001 | 2001 | TextureData ReduceTexture(TextureData texturedata, int resolution) // String name) |
---|
2002 | 2002 | { |
---|
| 2003 | + int pixelformat = texturedata.getPixelFormat(); |
---|
| 2004 | + |
---|
2003 | 2005 | int stride = 1; |
---|
2004 | | - if (texturedata.getPixelFormat() == GetGL().GL_RGB || texturedata.getPixelFormat() == GetGL().GL_BGR) // || texturedata.getPixelFormat() == GL.GL_LUMINANCE) |
---|
| 2006 | + if (pixelformat == GetGL().GL_RGB || pixelformat == GetGL().GL_BGR) // || texturedata.getPixelFormat() == GL.GL_LUMINANCE) |
---|
2005 | 2007 | stride = 3; |
---|
2006 | | - if (texturedata.getPixelFormat() == GetGL().GL_RGBA || texturedata.getPixelFormat() == GetGL().GL_BGRA) // || texturedata.getPixelFormat() == GL.GL_LUMINANCE_ALPHA) |
---|
| 2008 | + if (pixelformat == GetGL().GL_RGBA || pixelformat == GetGL().GL_BGRA) // || texturedata.getPixelFormat() == GL.GL_LUMINANCE_ALPHA) |
---|
2007 | 2009 | stride = 4; |
---|
2008 | 2010 | |
---|
2009 | 2011 | int width = texturedata.getWidth(); |
---|
.. | .. |
---|
6333 | 6335 | { |
---|
6334 | 6336 | bumpdepth--; |
---|
6335 | 6337 | |
---|
6336 | | - // GraphreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); |
---|
| 6338 | + // GrafreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); |
---|
6337 | 6339 | if (bumpstack[bumpdepth] != (texture!=null?texture.texture:null)) |
---|
6338 | 6340 | { |
---|
6339 | 6341 | // assert (bumpstack[bumpdepth] == texture); |
---|
.. | .. |
---|
6363 | 6365 | { |
---|
6364 | 6366 | pigmentdepth--; |
---|
6365 | 6367 | |
---|
6366 | | - // GraphreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); |
---|
| 6368 | + // GrafreeD.trace("POP " + tex + "(" + pigmentdepth + ")" + " : " + pigmentstack[pigmentdepth] + " vs " + texture); |
---|
6367 | 6369 | if (pigmentstack[pigmentdepth] != (texture!=null?texture.texture:null)) |
---|
6368 | 6370 | { |
---|
6369 | 6371 | // assert (pigmentstack[pigmentdepth] == texture); |
---|
.. | .. |
---|
6694 | 6696 | |
---|
6695 | 6697 | if (bump) |
---|
6696 | 6698 | { |
---|
6697 | | - // GraphreeD.trace("PUSH BUMP " + tex + "(" + bumpdepth + ")" + " : " + texture); |
---|
| 6699 | + // GrafreeD.trace("PUSH BUMP " + tex + "(" + bumpdepth + ")" + " : " + texture); |
---|
6698 | 6700 | bumpstack[bumpdepth++] = texture!=null?texture.texture:null; |
---|
6699 | 6701 | } |
---|
6700 | 6702 | else |
---|
6701 | 6703 | { |
---|
6702 | | - // GraphreeD.trace("PUSH PIGMENT " + tex + "(" + pigmentdepth + ")" + " : " + texture); |
---|
| 6704 | + // GrafreeD.trace("PUSH PIGMENT " + tex + "(" + pigmentdepth + ")" + " : " + texture); |
---|
6703 | 6705 | pigmentstack[pigmentdepth++] = texture!=null?texture.texture:null; |
---|
6704 | 6706 | } |
---|
6705 | 6707 | |
---|
.. | .. |
---|
7590 | 7592 | |
---|
7591 | 7593 | float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV |
---|
7592 | 7594 | float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation |
---|
7593 | | - float[] options3 = new float[]{1, 1, 1, 1}; // fog color. image intensity |
---|
| 7595 | + float[] options3 = new float[]{1, 1, 1, 0}; // fog color |
---|
| 7596 | + float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen |
---|
7594 | 7597 | |
---|
7595 | 7598 | static int imagecount = 0; // movie generation |
---|
7596 | 7599 | |
---|
.. | .. |
---|
7628 | 7631 | |
---|
7629 | 7632 | //System.out.println("start frame"); |
---|
7630 | 7633 | gl.glClear(gl.GL_ACCUM_BUFFER_BIT); |
---|
7631 | | - for (jitter = 0; jitter < ACSIZE; jitter++) //, GraphreeD.wav.cursor += LIVE ? 735 : 0) |
---|
| 7634 | + for (jitter = 0; jitter < ACSIZE; jitter++) //, GrafreeD.wav.cursor += LIVE ? 735 : 0) |
---|
7632 | 7635 | { |
---|
7633 | 7636 | framecount++; |
---|
7634 | 7637 | |
---|
7635 | 7638 | if (CameraPane.tickcount > 0) |
---|
7636 | 7639 | CameraPane.tickcount--; |
---|
7637 | 7640 | |
---|
7638 | | -// GraphreeD.wav.cursor += 735; // 44100 Hz / 120 Hz * 2 (for 16 bits) |
---|
| 7641 | +// GrafreeD.wav.cursor += 735; // 44100 Hz / 120 Hz * 2 (for 16 bits) |
---|
7639 | 7642 | // restartframe = true; |
---|
7640 | 7643 | if (options1[2] > 100 && (jitter%2==0)) |
---|
7641 | 7644 | { |
---|
.. | .. |
---|
7923 | 7926 | |
---|
7924 | 7927 | if (!BOXMODE) |
---|
7925 | 7928 | { |
---|
7926 | | - System.out.println("image: " + fullname + " (" + (GraphreeD.wav.cursor / 735 / 4) + ")"); |
---|
| 7929 | + System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")"); |
---|
7927 | 7930 | } |
---|
7928 | 7931 | |
---|
7929 | 7932 | if (!BOXMODE) |
---|
.. | .. |
---|
7951 | 7954 | { |
---|
7952 | 7955 | if (ACSIZE > 1) |
---|
7953 | 7956 | { |
---|
7954 | | - // System.err.println("image #" + (GraphreeD.wav.cursor / 735 / 4)); |
---|
| 7957 | + // System.err.println("image #" + (GrafreeD.wav.cursor / 735 / 4)); |
---|
7955 | 7958 | } |
---|
7956 | 7959 | } |
---|
7957 | 7960 | |
---|
.. | .. |
---|
7961 | 7964 | ABORTED = false; |
---|
7962 | 7965 | } |
---|
7963 | 7966 | else |
---|
7964 | | - GraphreeD.wav.cursor += 735 * ACSIZE; |
---|
| 7967 | + GrafreeD.wav.cursor += 735 * ACSIZE; |
---|
7965 | 7968 | |
---|
7966 | 7969 | if (false) |
---|
7967 | 7970 | { |
---|
.. | .. |
---|
8631 | 8634 | |
---|
8632 | 8635 | public void display(GLAutoDrawable drawable) |
---|
8633 | 8636 | { |
---|
8634 | | - if (GraphreeD.savesound && GraphreeD.hassound) |
---|
| 8637 | + if (GrafreeD.savesound && GrafreeD.hassound) |
---|
8635 | 8638 | { |
---|
8636 | | - GraphreeD.wav.save(); |
---|
8637 | | - GraphreeD.savesound = false; |
---|
8638 | | - GraphreeD.hassound = false; |
---|
| 8639 | + GrafreeD.wav.save(); |
---|
| 8640 | + GrafreeD.savesound = false; |
---|
| 8641 | + GrafreeD.hassound = false; |
---|
8639 | 8642 | } |
---|
8640 | 8643 | // if (DEBUG_SELECTION) |
---|
8641 | 8644 | // { |
---|
.. | .. |
---|
8765 | 8768 | Object3D theobject = object; |
---|
8766 | 8769 | Object3D theparent = object.parent; |
---|
8767 | 8770 | object.parent = null; |
---|
8768 | | - object = (Object3D)GraphreeD.clone(object); |
---|
| 8771 | + object = (Object3D)GrafreeD.clone(object); |
---|
8769 | 8772 | object.Stripify(); |
---|
8770 | 8773 | if (theobject.selection == null || theobject.selection.Size() == 0) |
---|
8771 | 8774 | theobject.PreprocessOcclusion(this); |
---|
.. | .. |
---|
8784 | 8787 | if (!IsFrozen()) |
---|
8785 | 8788 | { |
---|
8786 | 8789 | // dec 2012 |
---|
8787 | | - if (!(!flash && !lightMode && drawMode == DEFAULT && ANTIALIAS > 0)) |
---|
| 8790 | + if (!ambientOcclusion && !(!flash && !lightMode && drawMode == DEFAULT && ANTIALIAS > 0)) |
---|
8788 | 8791 | { |
---|
8789 | 8792 | framecount++; |
---|
8790 | 8793 | shadowbuffer.display(); |
---|
.. | .. |
---|
9379 | 9382 | |
---|
9380 | 9383 | gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 63, options2, 0); |
---|
9381 | 9384 | gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 62, options3, 0); |
---|
| 9385 | + gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 61, options4, 0); |
---|
9382 | 9386 | |
---|
9383 | 9387 | options2[0] *= renderCamera.Distance(); |
---|
9384 | 9388 | |
---|
.. | .. |
---|
9660 | 9664 | e.printStackTrace(); |
---|
9661 | 9665 | } |
---|
9662 | 9666 | |
---|
9663 | | - if (GraphreeD.RENDERME > 0) |
---|
9664 | | - GraphreeD.RENDERME--; // mechante magouille |
---|
| 9667 | + if (GrafreeD.RENDERME > 0) |
---|
| 9668 | + GrafreeD.RENDERME--; // mechante magouille |
---|
9665 | 9669 | |
---|
9666 | 9670 | ONESTEP = false; |
---|
9667 | 9671 | } |
---|
.. | .. |
---|
9734 | 9738 | BindTextures(DEFAULT_TEXTURES, 2); |
---|
9735 | 9739 | } |
---|
9736 | 9740 | //System.out.println("--> " + stackdepth); |
---|
9737 | | -// GraphreeD.traceon(); |
---|
| 9741 | +// GrafreeD.traceon(); |
---|
9738 | 9742 | |
---|
9739 | 9743 | // DRAW |
---|
9740 | 9744 | object.draw(this, /*(Composite)*/ object, false, false); |
---|
.. | .. |
---|
9765 | 9769 | debugpoint2.material.color = 0.75f; |
---|
9766 | 9770 | debugpoint2.material.modulation = 0.75f; |
---|
9767 | 9771 | |
---|
| 9772 | + debugpoint3.radius = radius; |
---|
| 9773 | + debugpoint3.recalculate(); |
---|
| 9774 | + debugpoint3.material = new cMaterial(); |
---|
| 9775 | + debugpoint3.material.color = 0.5f; |
---|
| 9776 | + debugpoint3.material.modulation = 0.75f; |
---|
| 9777 | + |
---|
| 9778 | + debugpoint4.radius = radius; |
---|
| 9779 | + debugpoint4.recalculate(); |
---|
| 9780 | + debugpoint4.material = new cMaterial(); |
---|
| 9781 | + debugpoint4.material.color = 0f; |
---|
| 9782 | + debugpoint4.material.modulation = 0.75f; |
---|
| 9783 | + |
---|
9768 | 9784 | InitPoints(radius); |
---|
9769 | 9785 | } |
---|
9770 | 9786 | selectedpoint.draw(this, /*(Composite)*/ null, false, false); |
---|
9771 | | - //debugpoint.draw(this, /*(Composite)*/ null, false); |
---|
9772 | | - //debugpoint2.draw(this, /*(Composite)*/ null, false); |
---|
9773 | | - DrawPoints(this); |
---|
| 9787 | + debugpoint.draw(this, /*(Composite)*/ null, false,false); |
---|
| 9788 | + debugpoint2.draw(this, /*(Composite)*/ null, false,false); |
---|
| 9789 | + debugpoint3.draw(this, /*(Composite)*/ null, false,false); |
---|
| 9790 | + debugpoint4.draw(this, /*(Composite)*/ null, false,false); |
---|
| 9791 | + // DrawPoints(this); |
---|
9774 | 9792 | } |
---|
9775 | 9793 | |
---|
9776 | 9794 | // debugstuff.draw(this, /*(Composite)*/ null, false); |
---|
9777 | 9795 | } |
---|
9778 | | -// GraphreeD.traceoff(); |
---|
| 9796 | +// GrafreeD.traceoff(); |
---|
9779 | 9797 | //System.out.println(stackdepth); |
---|
9780 | 9798 | if (drawMode == 0) |
---|
9781 | 9799 | { |
---|
.. | .. |
---|
10343 | 10361 | "PARAM params6 = program.env[6];" + // bump, noise, borderfade, fog punchthrough |
---|
10344 | 10362 | "PARAM params7 = program.env[7];" + // noise power, opacity power |
---|
10345 | 10363 | "PARAM options0 = program.env[63];" + // fog density, intensity, elevation |
---|
10346 | | - "PARAM options1 = program.env[62];" + // fog rgb color, image intensity |
---|
| 10364 | + "PARAM options1 = program.env[62];" + // fog rgb color |
---|
| 10365 | + "PARAM options2 = program.env[61];" + // image intensity, subsurface, lightsheen |
---|
10347 | 10366 | "PARAM pointlight = program.env[127];" + // ... |
---|
10348 | 10367 | "PARAM zero = { 0.0, 0.0, 0.0, 0.0 };" + |
---|
10349 | 10368 | "PARAM halfhalf = { 0.25, 0.25, 0.25, 1.0 };" + |
---|
10350 | 10369 | "PARAM half = { 0.5, 0.5, 0.5, 1.0 };" + |
---|
| 10370 | + "PARAM threequarter = { 0.75, 0.75, 0.75, 1.0 };" + |
---|
10351 | 10371 | "PARAM two = { 2.0, 2.0, 2.0, 1.0 };" + |
---|
10352 | 10372 | "PARAM ten = { 10, 10, 10, 1.0 };" + |
---|
10353 | 10373 | "PARAM one3rd = { 0.5, 0.33333333333, 0.333333333, 1.0 };" + |
---|
.. | .. |
---|
10408 | 10428 | "TEMP R1;" + |
---|
10409 | 10429 | "TEMP R2;" + |
---|
10410 | 10430 | "TEMP R3;" + |
---|
| 10431 | + "TEMP min;" + |
---|
| 10432 | + "TEMP max;" + |
---|
| 10433 | + "TEMP average;" + |
---|
| 10434 | + "TEMP saturation;" + |
---|
10411 | 10435 | "TEMP keep1;" + |
---|
10412 | 10436 | "TEMP keep2;" + |
---|
10413 | 10437 | "TEMP keep3;" + |
---|
.. | .. |
---|
10938 | 10962 | |
---|
10939 | 10963 | // skin? |
---|
10940 | 10964 | // Saturation for skin |
---|
10941 | | - /**/ // c'est ici |
---|
10942 | | - (Skinshader? "DP3 temp.x, final,one;" + |
---|
| 10965 | + /**/ |
---|
| 10966 | + (Skinshader? |
---|
| 10967 | + "DP3 average.x, final,one;" + |
---|
| 10968 | + "MUL average, one3rd.xxxx,average.xxxx;" + |
---|
| 10969 | + |
---|
| 10970 | + "MIN min.x, final.x,final.y;" + |
---|
| 10971 | + "MIN min.x, min.x,final.z;" + |
---|
| 10972 | + |
---|
| 10973 | + "MAX max.x, final.x,final.y;" + |
---|
| 10974 | + "MAX max.x, max.x,final.z;" + |
---|
| 10975 | + "MOV max, max.xxxx;" + |
---|
| 10976 | + |
---|
| 10977 | + "SUB saturation, max, final;" + |
---|
| 10978 | + |
---|
| 10979 | + "ADD temp.x, max.x, one10th.x;" + |
---|
| 10980 | + "RCP temp.x, temp.x;" + |
---|
| 10981 | + "MUL temp.x, temp.x, half.x;" + |
---|
| 10982 | + "MUL saturation, saturation, temp.xxxx;" + |
---|
| 10983 | + |
---|
| 10984 | + "DP3 ndotl.x, normald, light;" + |
---|
| 10985 | + "MAX ndotl.x, ndotl.x, -ndotl.x;" + |
---|
| 10986 | + |
---|
| 10987 | + "SUB temp.x, one.x, ndotl.x;" + |
---|
| 10988 | + "ADD temp.x, temp.x, options2.z;" + // lightsheen |
---|
| 10989 | + "ADD temp.y, one.y, options2.y;" + // sursurface |
---|
| 10990 | + "MUL temp.x, temp.x, temp.y;" + |
---|
| 10991 | + |
---|
| 10992 | + "MUL saturation, saturation, temp.xxxx;" + |
---|
| 10993 | + "SUB_SAT temp, max, saturation;" + |
---|
| 10994 | +/** |
---|
| 10995 | + "DP3 temp.x, final,one;" + |
---|
10943 | 10996 | "MUL R2, one3rd.xxxx,temp.xxxx;" + |
---|
10944 | | - "SUB temp, final,R2;" + |
---|
| 10997 | + "SUB temp, final, R2;" + |
---|
| 10998 | + |
---|
10945 | 10999 | // using light angle |
---|
10946 | 11000 | "DP3 ndotl.x, normald,light;" + |
---|
10947 | 11001 | //"SLT ndotl.y, ndotl.x, zero.x;" + |
---|
.. | .. |
---|
10954 | 11008 | // using light intensity |
---|
10955 | 11009 | "MOV ndotl.z, R2.x;" + |
---|
10956 | 11010 | "MUL ndotl.z, ndotl.z, ndotl.z;" + // tuning... |
---|
10957 | | - |
---|
10958 | 11011 | // june 2014 |
---|
10959 | 11012 | "MAD R1.x, ndotl.z,slope.y,one.x;" + |
---|
10960 | 11013 | // "SUB ndotl.x, one.x, ndotl.x;" + |
---|
.. | .. |
---|
10966 | 11019 | //"MUL R2.y, shadow.x,R2.y;" + // avril 2014 |
---|
10967 | 11020 | |
---|
10968 | 11021 | "MAD temp.x, R2.y, ndotl.y, temp.x;" + // red shift (skin) |
---|
| 11022 | +/**/ |
---|
10969 | 11023 | |
---|
10970 | 11024 | // "ADD final, R2,temp;" + |
---|
10971 | 11025 | "MOV final, temp;" |
---|
.. | .. |
---|
11055 | 11109 | /**/ |
---|
11056 | 11110 | // HDR |
---|
11057 | 11111 | "MOV temp.z, final.a;" + |
---|
11058 | | - "MUL final, final,options1.w;" + |
---|
| 11112 | + "MUL final, final,options2.x;" + |
---|
11059 | 11113 | "MOV final.a, temp.z;" + |
---|
11060 | 11114 | /**/ |
---|
11061 | 11115 | |
---|
.. | .. |
---|
11092 | 11146 | "MOV final.z, zero.x;" + |
---|
11093 | 11147 | "MOV final.a, one.w;":"" |
---|
11094 | 11148 | ) + |
---|
| 11149 | + /* |
---|
11095 | 11150 | (NORMALdebug?"MOV final.x, normal.x;" + |
---|
11096 | 11151 | "MOV final.y, normal.y;" + |
---|
11097 | 11152 | "MOV final.z, normal.z;" + |
---|
11098 | 11153 | "MOV final.a, one.w;":"" |
---|
| 11154 | + ) + |
---|
| 11155 | + */ |
---|
| 11156 | + (NORMALdebug?"SUB final.x, one.x, final.x;" + |
---|
| 11157 | + "SUB final.y, one.x, final.y;" + |
---|
| 11158 | + "SUB final.z, one.x, final.z;" + |
---|
| 11159 | + "MOV final.a, final.a;":"" |
---|
11099 | 11160 | ) + |
---|
11100 | 11161 | // "MOV final, bumpmap;" + |
---|
11101 | 11162 | "MOV result.color, final;" + |
---|
.. | .. |
---|
12793 | 12854 | { |
---|
12794 | 12855 | mouseMode |= ZOOM; |
---|
12795 | 12856 | } |
---|
12796 | | - if ((modifiers & META) == META) |
---|
| 12857 | + |
---|
| 12858 | + boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
| 12859 | + if (capsLocked || (modifiers & META) == META) |
---|
12797 | 12860 | { |
---|
12798 | 12861 | mouseMode |= VR; // BACKFORTH; |
---|
12799 | 12862 | } |
---|
.. | .. |
---|
12807 | 12870 | } |
---|
12808 | 12871 | if ((modifiers & SHIFT) == SHIFT || forcetranslate) |
---|
12809 | 12872 | { |
---|
| 12873 | + mouseMode &= ~VR; |
---|
12810 | 12874 | mouseMode |= TRANSLATE; |
---|
12811 | 12875 | } |
---|
12812 | 12876 | // if ((modifiers & SHIFT_META) == SHIFT_META) |
---|
.. | .. |
---|
13196 | 13260 | FlipTransform(); |
---|
13197 | 13261 | break; |
---|
13198 | 13262 | case ENTER: |
---|
13199 | | - object.editWindow.ScreenFit(); // Edit(); |
---|
| 13263 | + // object.editWindow.ScreenFit(); // Edit(); |
---|
| 13264 | + ToggleLive(); |
---|
13200 | 13265 | break; |
---|
13201 | 13266 | case DELETE: |
---|
13202 | 13267 | ClearSelection(); |
---|
.. | .. |
---|
14657 | 14722 | // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); |
---|
14658 | 14723 | // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); |
---|
14659 | 14724 | |
---|
| 14725 | + // Will fit the mesh !!! |
---|
| 14726 | + selectedpoint.toParent[0][0] = 0.0001; |
---|
| 14727 | + selectedpoint.toParent[1][1] = 0.0001; |
---|
| 14728 | + selectedpoint.toParent[2][2] = 0.0001; |
---|
| 14729 | + |
---|
14660 | 14730 | glu.gluUnProject(x,y,depth,view,0,tempmat2,0,viewport,0,selectedpoint.toParent[3],0); |
---|
14661 | 14731 | |
---|
14662 | 14732 | // if (object.selection != null && object.selection.Size() > 0) |
---|
.. | .. |
---|
14700 | 14770 | System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2])); |
---|
14701 | 14771 | } |
---|
14702 | 14772 | |
---|
14703 | | - previousselectedpoint = (Sphere) GraphreeD.clone(selectedpoint); |
---|
| 14773 | + previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint); |
---|
14704 | 14774 | } |
---|
14705 | 14775 | } |
---|
14706 | 14776 | |
---|
14707 | 14777 | if (!movingcamera && !PAINTMODE) |
---|
14708 | 14778 | object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
14709 | 14779 | |
---|
14710 | | - if (PAINTMODE && GraphreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
| 14780 | + if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
14711 | 14781 | { |
---|
14712 | | - Object3D paintobj = GraphreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
| 14782 | + Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
14713 | 14783 | |
---|
14714 | 14784 | Object3D group = new Object3D("inst" + paintcount++); |
---|
14715 | 14785 | |
---|
.. | .. |
---|
15279 | 15349 | int AAbuffersize = 0; |
---|
15280 | 15350 | |
---|
15281 | 15351 | //double[] selectedpoint = new double[3]; |
---|
15282 | | - static Sphere selectedpoint = new Sphere(); |
---|
| 15352 | + static Superellipsoid selectedpoint = new Superellipsoid(); |
---|
15283 | 15353 | static Sphere previousselectedpoint = null; |
---|
15284 | 15354 | static Sphere debugpoint = new Sphere(); |
---|
15285 | 15355 | static Sphere debugpoint2 = new Sphere(); |
---|
| 15356 | + static Sphere debugpoint3 = new Sphere(); |
---|
| 15357 | + static Sphere debugpoint4 = new Sphere(); |
---|
15286 | 15358 | |
---|
15287 | 15359 | static Sphere debugpoints[] = new Sphere[8]; |
---|
15288 | 15360 | |
---|