.. | .. |
---|
326 | 326 | cStatic.objectstack[materialdepth++] = obj; |
---|
327 | 327 | //System.out.println("material " + material); |
---|
328 | 328 | //Applet3D.tracein(this, selected); |
---|
329 | | - display.vector2buffer = obj.projectedVertices; |
---|
| 329 | + //display.vector2buffer = obj.projectedVertices; |
---|
330 | 330 | if (obj instanceof Camera) |
---|
331 | 331 | { |
---|
332 | 332 | display.options1[0] = material.shift; |
---|
.. | .. |
---|
335 | 335 | display.options1[2] = material.shadowbias; |
---|
336 | 336 | display.options1[3] = material.aniso; |
---|
337 | 337 | display.options1[4] = material.anisoV; |
---|
| 338 | +// System.out.println("display.options1[0] " + display.options1[0]); |
---|
| 339 | +// System.out.println("display.options1[1] " + display.options1[1]); |
---|
| 340 | +// System.out.println("display.options1[2] " + display.options1[2]); |
---|
| 341 | +// System.out.println("display.options1[3] " + display.options1[3]); |
---|
| 342 | +// System.out.println("display.options1[4] " + display.options1[4]); |
---|
338 | 343 | display.options2[0] = material.opacity; |
---|
339 | 344 | display.options2[1] = material.diffuse; |
---|
340 | 345 | display.options2[2] = material.factor; |
---|
| 346 | +// System.out.println("display.options2[0] " + display.options2[0]); |
---|
| 347 | +// System.out.println("display.options2[1] " + display.options2[1]); |
---|
| 348 | +// System.out.println("display.options2[2] " + display.options2[2]); |
---|
341 | 349 | |
---|
342 | 350 | cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3); |
---|
| 351 | +// System.out.println("display.options3[0] " + display.options3[0]); |
---|
| 352 | +// System.out.println("display.options3[1] " + display.options3[1]); |
---|
| 353 | +// System.out.println("display.options3[2] " + display.options3[2]); |
---|
343 | 354 | display.options4[0] = material.cameralight/0.2f; |
---|
344 | 355 | display.options4[1] = material.subsurface; |
---|
345 | 356 | display.options4[2] = material.sheen; |
---|
| 357 | +// System.out.println("display.options4[0] " + display.options4[0]); |
---|
| 358 | +// System.out.println("display.options4[1] " + display.options4[1]); |
---|
| 359 | +// System.out.println("display.options4[2] " + display.options4[2]); |
---|
346 | 360 | |
---|
347 | 361 | // if (display.CURRENTANTIALIAS > 0) |
---|
348 | 362 | // display.options3[3] /= 4; |
---|
.. | .. |
---|
358 | 372 | /**/ |
---|
359 | 373 | } else |
---|
360 | 374 | { |
---|
361 | | - DrawMaterial(material, selected); |
---|
| 375 | + DrawMaterial(material, selected, obj.projectedVertices); |
---|
362 | 376 | } |
---|
363 | 377 | } else |
---|
364 | 378 | { |
---|
.. | .. |
---|
382 | 396 | cStatic.objectstack[materialdepth++] = obj; |
---|
383 | 397 | //System.out.println("material " + material); |
---|
384 | 398 | //Applet3D.tracein("selected ", selected); |
---|
385 | | - display.vector2buffer = obj.projectedVertices; |
---|
386 | | - display.DrawMaterial(material, selected); |
---|
| 399 | + //display.vector2buffer = obj.projectedVertices; |
---|
| 400 | + display.DrawMaterial(material, selected, obj.projectedVertices); |
---|
387 | 401 | } |
---|
388 | 402 | } |
---|
389 | 403 | |
---|
.. | .. |
---|
400 | 414 | materialdepth -= 1; |
---|
401 | 415 | if (materialdepth > 0) |
---|
402 | 416 | { |
---|
403 | | - display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
404 | | - display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]); |
---|
| 417 | + //display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
| 418 | + display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices); |
---|
405 | 419 | } |
---|
406 | 420 | //Applet3D.traceout("selected ", (stackdepth>0)?selectedstack[stackdepth-1]:"???"); |
---|
407 | 421 | } else if (selected && CameraPane.flash && obj.GetMaterial() != null) |
---|
.. | .. |
---|
421 | 435 | materialdepth -= 1; |
---|
422 | 436 | if (materialdepth > 0) |
---|
423 | 437 | { |
---|
424 | | - display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
425 | | - display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]); |
---|
| 438 | + //display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
| 439 | + display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices); |
---|
426 | 440 | } |
---|
427 | 441 | //Applet3D.traceout("selected ", (stackdepth>0)?selectedstack[stackdepth-1]:"???"); |
---|
428 | 442 | //else |
---|
.. | .. |
---|
1610 | 1624 | // gl.glMaterialfv(gl.GL_BACK, gl.GL_DIFFUSE, colorV, 0); |
---|
1611 | 1625 | } |
---|
1612 | 1626 | |
---|
1613 | | - void DrawMaterial(cMaterial material, boolean selected) |
---|
| 1627 | + void DrawMaterial(cMaterial material, boolean selected, Object3D.cVector2[] others) |
---|
1614 | 1628 | { |
---|
1615 | 1629 | CameraPane display = this; |
---|
1616 | 1630 | //new Exception().printStackTrace(); |
---|
.. | .. |
---|
1645 | 1659 | colorV[0] = display.modelParams0[0] * material.diffuse; |
---|
1646 | 1660 | colorV[1] = display.modelParams0[1] * material.diffuse; |
---|
1647 | 1661 | colorV[2] = display.modelParams0[2] * material.diffuse; |
---|
1648 | | - colorV[3] = material.opacity; |
---|
| 1662 | + colorV[3] = 1; // material.opacity; |
---|
1649 | 1663 | |
---|
1650 | 1664 | gl.glColor4f(colorV[0], colorV[1], colorV[2], material.opacity); |
---|
1651 | 1665 | //System.out.println("Opacity = " + opacity); |
---|
.. | .. |
---|
1753 | 1767 | display.modelParams7[2] = 0; |
---|
1754 | 1768 | display.modelParams7[3] = 0; |
---|
1755 | 1769 | |
---|
1756 | | - display.modelParams6[0] = 100; // criss de bug de bump |
---|
| 1770 | + //display.modelParams6[0] = 100; // criss de bug de bump |
---|
1757 | 1771 | |
---|
1758 | | - Object3D.cVector2[] extparams = display.vector2buffer; |
---|
| 1772 | + Object3D.cVector2[] extparams = others; // display.vector2buffer; |
---|
1759 | 1773 | if (extparams != null && extparams.length > 0 && extparams[0] != null) |
---|
1760 | 1774 | { |
---|
1761 | 1775 | display.modelParams6[0] = extparams[0].x / 1000.0f; // bump |
---|
.. | .. |
---|
2382 | 2396 | public GL GetGL() // INTERFACE |
---|
2383 | 2397 | { |
---|
2384 | 2398 | return currentGL; |
---|
| 2399 | + } |
---|
| 2400 | + |
---|
| 2401 | + private void GetRemoteZip(String url, String name, boolean unzip, boolean save) |
---|
| 2402 | + { |
---|
| 2403 | + java.net.URL u; |
---|
| 2404 | + InputStream is = null; |
---|
| 2405 | + DataInputStream dis; |
---|
| 2406 | + java.util.zip.ZipInputStream zis; |
---|
| 2407 | + //String s; |
---|
| 2408 | + |
---|
| 2409 | + System.out.println("GetRemoteZip " + name); |
---|
| 2410 | + |
---|
| 2411 | + int total = 0; // dis.available(); |
---|
| 2412 | + |
---|
| 2413 | + byte[] bytes = new byte[16384]; |
---|
| 2414 | + |
---|
| 2415 | + try |
---|
| 2416 | + { |
---|
| 2417 | + u = new java.net.URL(url + name); |
---|
| 2418 | + is = u.openStream(); |
---|
| 2419 | + |
---|
| 2420 | + System.out.println(url + name); |
---|
| 2421 | + |
---|
| 2422 | + if (unzip) |
---|
| 2423 | + { |
---|
| 2424 | + //dis = new DataInputStream(new BufferedInputStream(is)); |
---|
| 2425 | + zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is)); |
---|
| 2426 | + //while ((s = dis.readLine()) != null) |
---|
| 2427 | + |
---|
| 2428 | + if (save) |
---|
| 2429 | + new java.io.File(name).mkdirs(); |
---|
| 2430 | + |
---|
| 2431 | + // FileOutputStream stream = new FileOutputStream("test.zip"); |
---|
| 2432 | + // |
---|
| 2433 | + // int count; |
---|
| 2434 | + // |
---|
| 2435 | + // while ((count = dis.read(bytes)) != -1) |
---|
| 2436 | + // { |
---|
| 2437 | + // //System.out.println(s); |
---|
| 2438 | + // System.out.println(count); |
---|
| 2439 | + // total += count; |
---|
| 2440 | + // stream.write(bytes); |
---|
| 2441 | + // } |
---|
| 2442 | + // |
---|
| 2443 | + // stream.close(); |
---|
| 2444 | + |
---|
| 2445 | + // now iterate through each item in the stream. The get next |
---|
| 2446 | + // entry call will return a ZipEntry for each file in the |
---|
| 2447 | + // stream |
---|
| 2448 | + java.util.zip.ZipEntry entry; |
---|
| 2449 | + while((entry = zis.getNextEntry())!=null) |
---|
| 2450 | + { |
---|
| 2451 | + if (entry.getName().endsWith(".gsm")) |
---|
| 2452 | + { |
---|
| 2453 | + continue; |
---|
| 2454 | + } |
---|
| 2455 | + |
---|
| 2456 | + String s = String.format("Entry: %s len %d added %TD", |
---|
| 2457 | + entry.getName(), entry.getSize(), |
---|
| 2458 | + new java.util.Date(entry.getTime())); |
---|
| 2459 | + System.out.println(s); |
---|
| 2460 | + |
---|
| 2461 | + if (save) |
---|
| 2462 | + { |
---|
| 2463 | + // Once we get the entry from the stream, the stream is |
---|
| 2464 | + // positioned read to read the raw data, and we keep |
---|
| 2465 | + // reading until read returns 0 or less. |
---|
| 2466 | + String outpath = name + "/" + entry.getName(); |
---|
| 2467 | + FileOutputStream output = null; |
---|
| 2468 | + try |
---|
| 2469 | + { |
---|
| 2470 | + output = new FileOutputStream(outpath); |
---|
| 2471 | + int len = 0; |
---|
| 2472 | + while ((len = zis.read(bytes)) > 0) |
---|
| 2473 | + { |
---|
| 2474 | + output.write(bytes, 0, len); |
---|
| 2475 | + } |
---|
| 2476 | + } |
---|
| 2477 | + finally |
---|
| 2478 | + { |
---|
| 2479 | + // we must always close the output file |
---|
| 2480 | + if(output!=null) output.close(); |
---|
| 2481 | + } |
---|
| 2482 | + } |
---|
| 2483 | + } |
---|
| 2484 | + } |
---|
| 2485 | + } |
---|
| 2486 | + catch (java.net.MalformedURLException mue) |
---|
| 2487 | + { |
---|
| 2488 | + System.err.println("Ouch - a MalformedURLException happened."); |
---|
| 2489 | + mue.printStackTrace(); |
---|
| 2490 | + //System.exit(2); |
---|
| 2491 | + } |
---|
| 2492 | + catch (IOException ioe) |
---|
| 2493 | + { |
---|
| 2494 | + //System.err.println("Oops - an IOException happened."); |
---|
| 2495 | + //ioe.printStackTrace(); |
---|
| 2496 | + //System.exit(3); |
---|
| 2497 | + } |
---|
| 2498 | + finally |
---|
| 2499 | + { |
---|
| 2500 | + try |
---|
| 2501 | + { |
---|
| 2502 | + if (is != null) |
---|
| 2503 | + is.close(); |
---|
| 2504 | + } |
---|
| 2505 | + catch (IOException ioe) |
---|
| 2506 | + { |
---|
| 2507 | + } |
---|
| 2508 | + } |
---|
| 2509 | + |
---|
| 2510 | + // System.out.println("length = " + total); |
---|
| 2511 | + |
---|
| 2512 | +// try |
---|
| 2513 | +// { |
---|
| 2514 | +// Runtime.getRuntime().exec("/usr/local/bin/wget https://archive3d.net/?a=download&do=get&id=7caca905"); |
---|
| 2515 | +// } |
---|
| 2516 | +// catch (Exception e) |
---|
| 2517 | +// { |
---|
| 2518 | +// e.printStackTrace(); |
---|
| 2519 | +// } |
---|
| 2520 | + |
---|
2385 | 2521 | } |
---|
2386 | 2522 | |
---|
2387 | 2523 | /**/ |
---|
.. | .. |
---|
9366 | 9502 | jy8[3] = 0.5f; |
---|
9367 | 9503 | } |
---|
9368 | 9504 | |
---|
9369 | | - float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV |
---|
| 9505 | + float[] options1 = new float[]{100, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV |
---|
9370 | 9506 | float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation |
---|
9371 | 9507 | float[] options3 = new float[]{1, 1, 1, 0}; // fog color |
---|
9372 | 9508 | float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen |
---|
9373 | 9509 | |
---|
| 9510 | + void ResetOptions() |
---|
| 9511 | + { |
---|
| 9512 | + options1[0] = 100; |
---|
| 9513 | + options1[1] = 0.025f; |
---|
| 9514 | + options1[2] = 0.01f; |
---|
| 9515 | + options1[3] = 0; |
---|
| 9516 | + options1[4] = 0; |
---|
| 9517 | + |
---|
| 9518 | + options2[0] = 0; |
---|
| 9519 | + options2[1] = 0.75f; |
---|
| 9520 | + options2[2] = 0; |
---|
| 9521 | + options2[3] = 0; |
---|
| 9522 | + |
---|
| 9523 | + options3[0] = 1; |
---|
| 9524 | + options3[1] = 1; |
---|
| 9525 | + options3[2] = 1; |
---|
| 9526 | + options3[3] = 0; |
---|
| 9527 | + |
---|
| 9528 | + options4[0] = 1; |
---|
| 9529 | + options4[1] = 0; |
---|
| 9530 | + options4[2] = 1; |
---|
| 9531 | + options4[3] = 0; |
---|
| 9532 | + } |
---|
| 9533 | + |
---|
9374 | 9534 | static int imagecount = 0; // movie generation |
---|
9375 | 9535 | |
---|
9376 | 9536 | static int jitter = 0; |
---|
.. | .. |
---|
10481 | 10641 | ANTIALIAS = 0; |
---|
10482 | 10642 | //System.out.println("RESTART"); |
---|
10483 | 10643 | AAtimer.restart(); |
---|
| 10644 | + Globals.TIMERRUNNING = true; |
---|
10484 | 10645 | } |
---|
10485 | 10646 | } |
---|
10486 | 10647 | } |
---|
.. | .. |
---|
10548 | 10709 | ambientOcclusion = false; |
---|
10549 | 10710 | } |
---|
10550 | 10711 | |
---|
10551 | | - if (Globals.lighttouched && DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN) |
---|
| 10712 | + if (//Globals.lighttouched && |
---|
| 10713 | + DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN) |
---|
10552 | 10714 | { |
---|
10553 | 10715 | //if (RENDERSHADOW) // ? |
---|
10554 | 10716 | if (!IsFrozen()) |
---|
.. | .. |
---|
11458 | 11620 | |
---|
11459 | 11621 | static boolean zoomonce = false; |
---|
11460 | 11622 | |
---|
11461 | | - void CreateSelectedPoint() |
---|
| 11623 | + static void CreateSelectedPoint() |
---|
11462 | 11624 | { |
---|
11463 | 11625 | if (selectedpoint == null) |
---|
11464 | 11626 | { |
---|
.. | .. |
---|
11478 | 11640 | |
---|
11479 | 11641 | void DrawObject(GL gl, boolean draw) |
---|
11480 | 11642 | { |
---|
| 11643 | + // To clear camera values |
---|
| 11644 | + ResetOptions(); |
---|
| 11645 | + |
---|
11481 | 11646 | //System.out.println("DRAW OBJECT " + mouseDown); |
---|
11482 | 11647 | // DrawMode() = SELECTION; |
---|
11483 | 11648 | //GL gl = getGL(); |
---|
.. | .. |
---|
12045 | 12210 | for (int i = tp.size(); --i >= 0;) |
---|
12046 | 12211 | { |
---|
12047 | 12212 | //for (int count = tp.get(i).GetTransformCount(); --count>=0;) |
---|
12048 | | - LA.xformPos(light, tp.get(i).GlobalTransform(), light); |
---|
| 12213 | + LA.xformPos(light, tp.get(i).GlobalTransformInv(), light); |
---|
12049 | 12214 | } |
---|
12050 | 12215 | |
---|
12051 | 12216 | |
---|
.. | .. |
---|
13315 | 13480 | /*static*/ float[] modelParams5 = new float[]{0, 0, 0, 0}; // texture, opacity, fakedepth, shadowbias |
---|
13316 | 13481 | /*static*/ float[] modelParams6 = new float[]{0, 0, 0, 0}; // bump, noise, borderfade, fog punchthrough |
---|
13317 | 13482 | /*static*/ float[] modelParams7 = new float[]{0, 0, 0, 0}; // noise power, opacity power |
---|
13318 | | - Object3D.cVector2[] vector2buffer; |
---|
| 13483 | + |
---|
| 13484 | + //Object3D.cVector2[] vector2buffer; |
---|
13319 | 13485 | |
---|
13320 | 13486 | // IN : ndotl, ndoth, xxx, NdotL //, snininess, lightarea |
---|
13321 | 13487 | // OUT : diff, spec |
---|
.. | .. |
---|
13331 | 13497 | "DP3 " + dest + ".z," + "normals," + "eye;" + |
---|
13332 | 13498 | "MAX " + dest + ".w," + dest + ".z," + "eps.x;" + |
---|
13333 | 13499 | //"MOV " + dest + ".w," + "normal.z;" + |
---|
13334 | | - "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + |
---|
13335 | | - "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" + |
---|
13336 | | - //"MOV " + dest + ".z," + "params2.w;" + |
---|
| 13500 | +// "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + // PRETTY HEURISTIC FOR VELVET |
---|
| 13501 | +// "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" + |
---|
| 13502 | + |
---|
| 13503 | + "MOV " + dest + ".z," + "params2.w;" + // EXACT |
---|
13337 | 13504 | "POW " + dest + ".w," + dest + ".w," + dest + ".z;" + |
---|
13338 | 13505 | "RCP " + dest + ".w," + dest + ".w;" + |
---|
13339 | 13506 | //"RSQ " + dest + ".w," + dest + ".w;" + |
---|
.. | .. |
---|
13838 | 14005 | else |
---|
13839 | 14006 | if (evt.getSource() == AAtimer) |
---|
13840 | 14007 | { |
---|
| 14008 | + Globals.TIMERRUNNING = false; |
---|
13841 | 14009 | if (mouseDown) |
---|
13842 | 14010 | { |
---|
13843 | 14011 | //new Exception().printStackTrace(); |
---|
.. | .. |
---|
13912 | 14080 | return; |
---|
13913 | 14081 | |
---|
13914 | 14082 | AAtimer.restart(); // |
---|
| 14083 | + Globals.TIMERRUNNING = true; |
---|
13915 | 14084 | |
---|
13916 | 14085 | // waslive = LIVE; |
---|
13917 | 14086 | // LIVE = false; |
---|
.. | .. |
---|
14375 | 14544 | info.camera = renderCamera; |
---|
14376 | 14545 | info.x = x; |
---|
14377 | 14546 | info.y = y; |
---|
14378 | | - object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); |
---|
| 14547 | + object.GetWindow().copy |
---|
| 14548 | + .doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); |
---|
14379 | 14549 | } else |
---|
14380 | 14550 | { |
---|
14381 | 14551 | if (x < startX) |
---|
.. | .. |
---|
14539 | 14709 | ci.camera = renderCamera; |
---|
14540 | 14710 | if (!isRenderer) |
---|
14541 | 14711 | { |
---|
14542 | | - if (object.editWindow.copy.doEditClick(ci, 0)) |
---|
| 14712 | + //ObjEditor editWindow = object.editWindow; |
---|
| 14713 | + //Object3D copy = editWindow.copy; |
---|
| 14714 | + if (object.doEditClick(ci, 0)) |
---|
14543 | 14715 | { |
---|
14544 | 14716 | setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
---|
14545 | 14717 | } else |
---|
.. | .. |
---|
15070 | 15242 | case '_': |
---|
15071 | 15243 | kompactbit = 5; |
---|
15072 | 15244 | break; |
---|
15073 | | - case '+': |
---|
15074 | | - kompactbit = 6; |
---|
15075 | | - break; |
---|
| 15245 | +// case '+': |
---|
| 15246 | +// kompactbit = 6; |
---|
| 15247 | +// break; |
---|
15076 | 15248 | case ' ': |
---|
15077 | 15249 | ObjEditor.theFrame.ToggleFullScreen(); |
---|
15078 | 15250 | repaint(); |
---|
.. | .. |
---|
15121 | 15293 | case DELETE: |
---|
15122 | 15294 | ClearSelection(); |
---|
15123 | 15295 | break; |
---|
15124 | | - /* |
---|
15125 | 15296 | case '+': |
---|
| 15297 | + |
---|
| 15298 | + //for (int i=0; i<0x7FFFFFFF; i++) |
---|
| 15299 | + { |
---|
| 15300 | + //String.format("%08X", i); // "7caca905" |
---|
| 15301 | + GetRemoteZip("https://archive3d.net/?a=download&do=get&id=", "7caca905", true, true); |
---|
| 15302 | + } |
---|
| 15303 | + |
---|
| 15304 | + /* |
---|
15126 | 15305 | //fontsize += 1; |
---|
15127 | 15306 | bbzoom *= 2; |
---|
15128 | 15307 | repaint(); |
---|
.. | .. |
---|
15373 | 15552 | } |
---|
15374 | 15553 | */ |
---|
15375 | 15554 | |
---|
15376 | | - object.editWindow.EditSelection(); |
---|
| 15555 | + object.editWindow.EditSelection(false); |
---|
15377 | 15556 | } |
---|
15378 | 15557 | |
---|
15379 | 15558 | void SelectParent() |
---|
.. | .. |
---|
16385 | 16564 | cStatic.objectstack[materialdepth++] = checker; |
---|
16386 | 16565 | //System.out.println("material " + material); |
---|
16387 | 16566 | //Applet3D.tracein(this, selected); |
---|
16388 | | - vector2buffer = checker.projectedVertices; |
---|
| 16567 | + //vector2buffer = checker.projectedVertices; |
---|
16389 | 16568 | |
---|
16390 | 16569 | //checker.GetMaterial().Draw(this, false); // true); |
---|
16391 | | - DrawMaterial(checker.GetMaterial(), false); // true); |
---|
| 16570 | + DrawMaterial(checker.GetMaterial(), false, checker.projectedVertices); // true); |
---|
16392 | 16571 | |
---|
16393 | 16572 | materialdepth -= 1; |
---|
16394 | 16573 | if (materialdepth > 0) |
---|
16395 | 16574 | { |
---|
16396 | | - vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
16397 | | - DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]); |
---|
| 16575 | + //vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices; |
---|
| 16576 | + DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices); |
---|
16398 | 16577 | } |
---|
16399 | 16578 | //checker.GetMaterial().opacity = 1f; |
---|
16400 | 16579 | ////checker.GetMaterial().ambient = 1f; |
---|
.. | .. |
---|
16618 | 16797 | // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]); |
---|
16619 | 16798 | // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]); |
---|
16620 | 16799 | |
---|
| 16800 | + CreateSelectedPoint(); |
---|
| 16801 | + |
---|
16621 | 16802 | // Will fit the mesh !!! |
---|
16622 | 16803 | selectedpoint.toParent[0][0] = 0.0001; |
---|
16623 | 16804 | selectedpoint.toParent[1][1] = 0.0001; |
---|
.. | .. |
---|
16732 | 16913 | //System.out.println("objects[color] = " + objects[color]); |
---|
16733 | 16914 | //objects[color].Select(); |
---|
16734 | 16915 | indexcount = 0; |
---|
| 16916 | + ObjEditor window = object.GetWindow(); |
---|
| 16917 | + if (window != null && deselect) |
---|
| 16918 | + { |
---|
| 16919 | + window.Select(null, deselect, true); |
---|
| 16920 | + } |
---|
16735 | 16921 | object.Select(color, deselect); |
---|
16736 | 16922 | } |
---|
16737 | 16923 | |
---|