Normand Briere
2019-07-01 9079880942d022ee32fd3a543843e132e52deb1a
CameraPane.java
....@@ -335,14 +335,28 @@
335335 display.options1[2] = material.shadowbias;
336336 display.options1[3] = material.aniso;
337337 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]);
338343 display.options2[0] = material.opacity;
339344 display.options2[1] = material.diffuse;
340345 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]);
341349
342350 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]);
343354 display.options4[0] = material.cameralight/0.2f;
344355 display.options4[1] = material.subsurface;
345356 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]);
346360
347361 // if (display.CURRENTANTIALIAS > 0)
348362 // display.options3[3] /= 4;
....@@ -9366,11 +9380,35 @@
93669380 jy8[3] = 0.5f;
93679381 }
93689382
9369
- float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV
9383
+ float[] options1 = new float[]{100, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV
93709384 float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation
93719385 float[] options3 = new float[]{1, 1, 1, 0}; // fog color
93729386 float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen
93739387
9388
+ void ResetOptions()
9389
+ {
9390
+ options1[0] = 100;
9391
+ options1[1] = 0.025f;
9392
+ options1[2] = 0.01f;
9393
+ options1[3] = 0;
9394
+ options1[4] = 0;
9395
+
9396
+ options2[0] = 0;
9397
+ options2[1] = 0.75f;
9398
+ options2[2] = 0;
9399
+ options2[3] = 0;
9400
+
9401
+ options3[0] = 1;
9402
+ options3[1] = 1;
9403
+ options3[2] = 1;
9404
+ options3[3] = 0;
9405
+
9406
+ options4[0] = 1;
9407
+ options4[1] = 0;
9408
+ options4[2] = 1;
9409
+ options4[3] = 0;
9410
+ }
9411
+
93749412 static int imagecount = 0; // movie generation
93759413
93769414 static int jitter = 0;
....@@ -10481,6 +10519,7 @@
1048110519 ANTIALIAS = 0;
1048210520 //System.out.println("RESTART");
1048310521 AAtimer.restart();
10522
+ Globals.TIMERRUNNING = true;
1048410523 }
1048510524 }
1048610525 }
....@@ -11459,7 +11498,7 @@
1145911498
1146011499 static boolean zoomonce = false;
1146111500
11462
- void CreateSelectedPoint()
11501
+ static void CreateSelectedPoint()
1146311502 {
1146411503 if (selectedpoint == null)
1146511504 {
....@@ -11479,6 +11518,9 @@
1147911518
1148011519 void DrawObject(GL gl, boolean draw)
1148111520 {
11521
+ // To clear camera values
11522
+ ResetOptions();
11523
+
1148211524 //System.out.println("DRAW OBJECT " + mouseDown);
1148311525 // DrawMode() = SELECTION;
1148411526 //GL gl = getGL();
....@@ -12046,7 +12088,7 @@
1204612088 for (int i = tp.size(); --i >= 0;)
1204712089 {
1204812090 //for (int count = tp.get(i).GetTransformCount(); --count>=0;)
12049
- LA.xformPos(light, tp.get(i).GlobalTransform(), light);
12091
+ LA.xformPos(light, tp.get(i).GlobalTransformInv(), light);
1205012092 }
1205112093
1205212094
....@@ -13333,9 +13375,10 @@
1333313375 "DP3 " + dest + ".z," + "normals," + "eye;" +
1333413376 "MAX " + dest + ".w," + dest + ".z," + "eps.x;" +
1333513377 //"MOV " + dest + ".w," + "normal.z;" +
13336
- "MUL " + dest + ".z," + "params2.w," + dest + ".x;" +
13337
- "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +
13338
- //"MOV " + dest + ".z," + "params2.w;" +
13378
+// "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + // PRETTY HEURISTIC FOR VELVET
13379
+// "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +
13380
+
13381
+ "MOV " + dest + ".z," + "params2.w;" + // EXACT
1333913382 "POW " + dest + ".w," + dest + ".w," + dest + ".z;" +
1334013383 "RCP " + dest + ".w," + dest + ".w;" +
1334113384 //"RSQ " + dest + ".w," + dest + ".w;" +
....@@ -13840,6 +13883,7 @@
1384013883 else
1384113884 if (evt.getSource() == AAtimer)
1384213885 {
13886
+ Globals.TIMERRUNNING = false;
1384313887 if (mouseDown)
1384413888 {
1384513889 //new Exception().printStackTrace();
....@@ -13914,6 +13958,7 @@
1391413958 return;
1391513959
1391613960 AAtimer.restart(); //
13961
+ Globals.TIMERRUNNING = true;
1391713962
1391813963 // waslive = LIVE;
1391913964 // LIVE = false;
....@@ -14377,7 +14422,8 @@
1437714422 info.camera = renderCamera;
1437814423 info.x = x;
1437914424 info.y = y;
14380
- object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
14425
+ object.GetWindow().copy
14426
+ .doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
1438114427 } else
1438214428 {
1438314429 if (x < startX)
....@@ -14541,9 +14587,9 @@
1454114587 ci.camera = renderCamera;
1454214588 if (!isRenderer)
1454314589 {
14544
- ObjEditor editWindow = object.editWindow;
14545
- Object3D copy = editWindow.copy;
14546
- if (copy.doEditClick(ci, 0))
14590
+ //ObjEditor editWindow = object.editWindow;
14591
+ //Object3D copy = editWindow.copy;
14592
+ if (object.doEditClick(ci, 0))
1454714593 {
1454814594 setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
1454914595 } else
....@@ -15074,9 +15120,9 @@
1507415120 case '_':
1507515121 kompactbit = 5;
1507615122 break;
15077
- case '+':
15078
- kompactbit = 6;
15079
- break;
15123
+// case '+':
15124
+// kompactbit = 6;
15125
+// break;
1508015126 case ' ':
1508115127 ObjEditor.theFrame.ToggleFullScreen();
1508215128 repaint();
....@@ -15125,8 +15171,9 @@
1512515171 case DELETE:
1512615172 ClearSelection();
1512715173 break;
15128
- /*
1512915174 case '+':
15175
+
15176
+ /*
1513015177 //fontsize += 1;
1513115178 bbzoom *= 2;
1513215179 repaint();
....@@ -15377,7 +15424,7 @@
1537715424 }
1537815425 */
1537915426
15380
- object.editWindow.EditSelection();
15427
+ object.editWindow.EditSelection(false);
1538115428 }
1538215429
1538315430 void SelectParent()
....@@ -16622,6 +16669,8 @@
1662216669 // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]);
1662316670 // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]);
1662416671
16672
+ CreateSelectedPoint();
16673
+
1662516674 // Will fit the mesh !!!
1662616675 selectedpoint.toParent[0][0] = 0.0001;
1662716676 selectedpoint.toParent[1][1] = 0.0001;
....@@ -16736,6 +16785,11 @@
1673616785 //System.out.println("objects[color] = " + objects[color]);
1673716786 //objects[color].Select();
1673816787 indexcount = 0;
16788
+ ObjEditor window = object.GetWindow();
16789
+ if (window != null && deselect)
16790
+ {
16791
+ window.Select(null, deselect, true);
16792
+ }
1673916793 object.Select(color, deselect);
1674016794 }
1674116795