Normand Briere
2019-05-01 b1585b5b2b60c4165be400636c787fae24428c6a
CameraPane.java
....@@ -86,12 +86,14 @@
8686 static boolean FULLSCREEN = false;
8787 static boolean SUPPORT = true;
8888 static boolean INERTIA = true;
89
-static boolean FAST = false;
89
+static boolean FAST = true; // false;
9090 static boolean SLOWPOSE = false;
9191 static boolean FOOTCONTACT = true;
9292
9393 static int tickcount = 0; // slow pose issue
9494
95
+static boolean BUTTONLESSWHEEL = false;
96
+static boolean ZOOMBOXMODE = false;
9597 static boolean BOXMODE = false;
9698 static boolean IMAGEFLIP = false;
9799 static boolean SMOOTHFOCUS = false;
....@@ -223,6 +225,11 @@
223225 public boolean IsBoxMode()
224226 {
225227 return BOXMODE;
228
+ }
229
+
230
+ public boolean IsZoomBoxMode()
231
+ {
232
+ return ZOOMBOXMODE;
226233 }
227234
228235 public void ClearDepth()
....@@ -1612,12 +1619,12 @@
16121619 //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0);
16131620 if (!material.multiply)
16141621 {
1615
- display.color = color;
1622
+ display.color = material.color;
16161623 display.saturation = material.modulation;
16171624 }
16181625 else
16191626 {
1620
- display.color *= color*2;
1627
+ display.color *= material.color*2;
16211628 display.saturation *= material.modulation*2;
16221629 }
16231630
....@@ -2168,6 +2175,11 @@
21682175 public void ToggleBoxMode()
21692176 {
21702177 BOXMODE ^= true;
2178
+ }
2179
+
2180
+ public void ToggleZoomBoxMode()
2181
+ {
2182
+ ZOOMBOXMODE ^= true;
21712183 }
21722184
21732185 public void ToggleSmoothFocus()
....@@ -4196,6 +4208,7 @@
41964208
41974209 com.sun.opengl.util.texture.Texture CompressTexture2(String name)
41984210 {
4211
+ new Exception().printStackTrace();
41994212 System.exit(0);
42004213 com.sun.opengl.util.texture.Texture texture = null;
42014214
....@@ -12735,7 +12748,7 @@
1273512748 "MUL final.y, fragment.texcoord[0].x, c256;" +
1273612749 "FLR final.x, final.y;" +
1273712750 "SUB final.y, final.y, final.x;" +
12738
- "MUL final.x, final.x, c256i;" +
12751
+ //"MUL final.x, final.x, c256i;" +
1273912752 "MOV final.z, zero.x;" +
1274012753 "MOV final.a, one.w;":""
1274112754 ) +
....@@ -12743,7 +12756,7 @@
1274312756 "MUL final.y, fragment.texcoord[0].y, c256;" +
1274412757 "FLR final.x, final.y;" +
1274512758 "SUB final.y, final.y, final.x;" +
12746
- "MUL final.x, final.x, c256i;" +
12759
+ //"MUL final.x, final.x, c256i;" +
1274712760 "MOV final.z, zero.x;" +
1274812761 "MOV final.a, one.w;":""
1274912762 ) +
....@@ -13523,6 +13536,7 @@
1352313536
1352413537 //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio);
1352513538
13539
+ if (BUTTONLESSWHEEL)
1352613540 if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30)
1352713541 {
1352813542 return;
....@@ -13531,7 +13545,7 @@
1353113545 boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
1353213546
1353313547 // TIMER
13534
- if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR
13548
+ if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR
1353513549 {
1353613550 keepboxmode = BOXMODE;
1353713551 keepsupport = SUPPORT;
....@@ -13748,11 +13762,11 @@
1374813762
1374913763 public void mouseDragged(MouseEvent e)
1375013764 {
13765
+ //System.out.println("mouseDragged: " + e);
1375113766 if (isRenderer)
1375213767 movingcamera = true;
1375313768 //if (drawing)
1375413769 //return;
13755
- //System.out.println("mouseDragged: " + e);
1375613770 if ((e.getModifiersEx() & CTRL) != 0
1375713771 || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen())
1375813772 {
....@@ -13933,6 +13947,7 @@
1393313947
1393413948 public void run()
1393513949 {
13950
+ new Exception().printStackTrace();
1393613951 System.exit(0);
1393713952 for (;;)
1393813953 {
....@@ -14287,7 +14302,6 @@
1428714302 public void mouseMoved(MouseEvent e)
1428814303 {
1428914304 //System.out.println("mouseMoved: " + e);
14290
-
1429114305 if (isRenderer)
1429214306 return;
1429314307
....@@ -15100,8 +15114,9 @@
1510015114
1510115115 protected void processMouseMotionEvent(MouseEvent e)
1510215116 {
15103
- //System.out.println("processMouseMotionEvent: " + mouseMode);
15104
- if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15117
+ //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton());
15118
+ //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0)
15119
+ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0)
1510515120 {
1510615121 mouseMoved(e);
1510715122 } else
....@@ -15131,6 +15146,7 @@
1513115146
1513215147 void SelectParent()
1513315148 {
15149
+ new Exception().printStackTrace();
1513415150 System.exit(0);
1513515151 Composite group = (Composite) object;
1513615152 java.util.Vector selectees = new java.util.Vector(group.selection);
....@@ -15154,6 +15170,7 @@
1515415170
1515515171 void SelectChildren()
1515615172 {
15173
+ new Exception().printStackTrace();
1515715174 System.exit(0);
1515815175 /*
1515915176 Composite group = (Composite) object;
....@@ -16267,6 +16284,7 @@
1626716284 {
1626816285 if (!selection)
1626916286 {
16287
+ new Exception().printStackTrace();
1627016288 System.exit(0);
1627116289 return;
1627216290 }