Normand Briere
2019-10-04 57c5b6cd8d12ffdaa3e0b099451e3c031012750a
CameraPane.java
....@@ -1,4 +1,5 @@
11
2
+import com.bulletphysics.dynamics.RigidBody;
23 import java.awt.*;
34 import java.awt.event.*;
45 import java.awt.image.*;
....@@ -123,7 +124,7 @@
123124 static boolean LOCALTRANSFORM = false;
124125 static boolean FULLSCREEN = false;
125126 static boolean SUPPORT = true;
126
-static boolean INERTIA = true;
127
+static boolean INERTIA = false; // true;
127128 static boolean FAST = false;
128129 static boolean SLOWPOSE = false;
129130 static boolean FOOTCONTACT = true;
....@@ -134,7 +135,7 @@
134135 static boolean ZOOMBOXMODE = false;
135136 static boolean BOXMODE = false;
136137 static boolean IMAGEFLIP = false;
137
-static boolean SMOOTHFOCUS = false;
138
+static boolean SMOOTHFOCUS = true; // false;
138139 static boolean SPEAKERMOCAP = true; // jan 2014 false;
139140 static boolean SPEAKERCAMERA = false;
140141 static boolean SPEAKERFOCUS = false;
....@@ -249,7 +250,7 @@
249250
250251 public javax.media.opengl.GL GetGL0()
251252 {
252
- return null;
253
+ return currentGL;
253254 }
254255
255256 public int GenList()
....@@ -1529,7 +1530,7 @@
15291530 }
15301531 }
15311532 float b = 0;
1532
- if (obj.support != null && obj.link2master)
1533
+ if (obj.support != null && obj.Link2Support())
15331534 {
15341535 b = 1;
15351536 }
....@@ -2109,7 +2110,7 @@
21092110 // Start with free camera
21102111 SwitchCameras(true);
21112112
2112
- pingthread.jump = true; // optional?
2113
+// pingthread.jump = true; // optional?
21132114
21142115 if (TRACKONCE)
21152116 {
....@@ -2296,18 +2297,6 @@
22962297 public void ToggleTrack()
22972298 {
22982299 TRACK ^= true;
2299
- if (TRACK)
2300
- {
2301
- if (object.selection != null &&
2302
- object.selection.size() > 0 &&
2303
- object.selection.elementAt(0) != null &&
2304
- !(object.selection.elementAt(0) instanceof Camera) &&
2305
- !(object.selection.elementAt(0) instanceof ScriptNode))
2306
- {
2307
- trackedobject = object.selection.elementAt(0);
2308
- repaint();
2309
- }
2310
- }
23112300
23122301 repaint();
23132302 }
....@@ -3601,6 +3590,8 @@
36013590 };
36023591 /**/
36033592
3593
+ static Object3D lastObject;
3594
+
36043595 //com.sun.opengl.util.texture.Texture
36053596 TextureData
36063597 GetFileTexture(String name, boolean bump, int resolution)
....@@ -3637,6 +3628,8 @@
36373628 // return null;
36383629 //if (i == 2)
36393630 // return null;
3631
+ // TIFF issue sept 2019
3632
+ System.err.println("lastObject = " + lastObject);
36403633 e.printStackTrace();
36413634 name = name.split("\\.tif")[0] + ".jpg";
36423635 }
....@@ -6969,30 +6962,30 @@
69696962 short residu = 0;
69706963
69716964 // wraparound workarounds
6972
- short fuck = (short) (buffer[i] & 0xFF);
6965
+ short ww = (short) (buffer[i] & 0xFF);
69736966 /*
6974
- residu += (fuck%2);
6975
- if(fuck/2 < 256-residu/2)
6967
+ residu += (ww%2);
6968
+ if(ww/2 < 256-residu/2)
69766969 {
6977
- fuck = (short)((fuck/2) + residu/2);
6970
+ ww = (short)((ww/2) + residu/2);
69786971 if(residu == 2)
69796972 residu = 0;
69806973 }
69816974 else
69826975 {
69836976 residu = 0;
6984
- fuck /= 2;
6977
+ ww /= 2;
69856978 }
69866979 */
6987
- if (i < imglength / 3 || rnd.nextFloat() < 0.5 || fuck >= 254)
6980
+ if (i < imglength / 3 || rnd.nextFloat() < 0.5 || ww >= 254)
69886981 {
6989
- fuck /= 2;
6982
+ ww /= 2;
69906983 } else
69916984 {
6992
- fuck = (short) ((fuck / 2) + fuck % 2);
6985
+ ww = (short) ((ww / 2) + ww % 2);
69936986 }
69946987
6995
- buffer[i] = (byte) fuck;
6988
+ buffer[i] = (byte) ww;
69966989 }
69976990 //System.out.print(bytes[i] + " ");
69986991 //if(buffer[i] >= 0 && buffer[i]<=eps-1) buffer[i] = eps;
....@@ -9850,7 +9843,7 @@
98509843
98519844 boolean vr = capsLocked && !lightMode;
98529845
9853
- accPerspective(gl, renderCamera.shaper_fovy / ratio * (vr ? 2 : 1),
9846
+ accPerspective(gl, renderCamera.shaper_fovy / ratio * (vr ? 1.2 : 1),
98549847 ratio,
98559848 //near_plane, far_plane,
98569849 renderCamera.shaper_zNear * renderCamera.Distance(), renderCamera.shaper_zFar * renderCamera.Distance(),
....@@ -10768,7 +10761,9 @@
1076810761 }
1076910762 /**/
1077010763
10771
- if (selection)
10764
+ boolean control = ((modifiers & CTRL) != 0);
10765
+
10766
+ if (selection && (!Globals.isLIVE() || control))
1077210767 {
1077310768 selectbuffer.display();
1077410769 return;
....@@ -10911,6 +10906,12 @@
1091110906 }
1091210907 else
1091310908 speedkey[RIGHT_ARROW] = 0;
10909
+
10910
+ if (Globals.WALK && capsLocked)
10911
+ {
10912
+ Walk();
10913
+ keyon = true;
10914
+ }
1091410915
1091510916 if (keyon)
1091610917 {
....@@ -11509,7 +11510,8 @@
1150911510 {
1151011511 boolean vr = capsLocked && !lightMode;
1151111512
11512
- glu.gluPerspective(cam.shaper_fovy / ratio * (vr ? 2 : 1), ratio, cam.shaper_zNear * cam.Distance(), cam.shaper_zFar * cam.Distance());
11513
+ glu.gluPerspective(cam.shaper_fovy / ratio * (vr ? 1.2 : 1),
11514
+ ratio, cam.shaper_zNear * cam.Distance(), cam.shaper_zFar * cam.Distance());
1151311515 }
1151411516 }
1151511517
....@@ -11865,8 +11867,11 @@
1186511867 repaint();
1186611868 }
1186711869
11868
- if (Globals.isLIVE() && DrawMode() == DEFAULT) // may 2013
11870
+ if (Globals.isLIVE() && DrawMode() == DEFAULT || pingthread.live) // may 2013
11871
+ {
11872
+ renderCamera.computeTransform();
1186911873 repaint();
11874
+ }
1187011875
1187111876 displaydone = true;
1187211877 }
....@@ -11941,9 +11946,23 @@
1194111946 //GL gl = getGL();
1194211947 if ((TRACK || SHADOWTRACK) || zoomonce)
1194311948 {
11949
+ if (TRACK)
11950
+ {
11951
+ if (object.selection != null &&
11952
+ object.selection.size() > 0 &&
11953
+ object.selection.elementAt(0) != null &&
11954
+ !(object.selection.elementAt(0) instanceof Camera) &&
11955
+ !(object.selection.elementAt(0) instanceof ScriptNode))
11956
+ {
11957
+ trackedobject = object.selection.elementAt(0);
11958
+ //repaint();
11959
+ }
11960
+ else
11961
+ trackedobject = null;
11962
+ }
1194411963 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
1194511964 object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
11946
- pingthread.StepToTarget(true); // true);
11965
+ pingthread.StepToTarget(); // true);
1194711966 // zoomonce = false;
1194811967 }
1194911968
....@@ -14324,6 +14343,7 @@
1432414343 public void mouseClicked(MouseEvent e)
1432514344 {
1432614345 System.out.println("mouseClicked: " + e);
14346
+ System.exit(0);
1432714347 }
1432814348
1432914349 public void mousePressed(MouseEvent e)
....@@ -14408,7 +14428,7 @@
1440814428 //}
1440914429
1441014430 SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx());
14411
- drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0);
14431
+ drag(anchorX, anchorY + e.getUnitsToScroll()*8, e.getModifiers(), e.getModifiersEx());
1441214432 anchorX = ax;
1441314433 anchorY = ay;
1441414434 prevX = px;
....@@ -14503,8 +14523,9 @@
1450314523 // fev 2014???
1450414524 if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode)
1450514525 object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
14506
- pingthread.StepToTarget(true); // true);
14526
+ pingthread.StepToTarget(); // true);
1450714527 }
14528
+
1450814529 // if (!LIVE)
1450914530 super.repaint();
1451014531 }
....@@ -14599,8 +14620,8 @@
1459914620
1460014621 //if (drawing)
1460114622 //return;
14602
- if ((e.getModifiersEx() & CTRL) != 0
14603
- || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen())
14623
+ if ((e.getModifiersEx() & CTRL) != 0 ||
14624
+ (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen())
1460414625 {
1460514626 //System.out.println("mouseDragged: " + e);
1460614627 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
....@@ -14624,11 +14645,17 @@
1462414645 return targetLookAt;
1462514646 }
1462614647
14648
+ javax.vecmath.Point3d eye = new javax.vecmath.Point3d();
14649
+ javax.vecmath.Point3d eye2 = new javax.vecmath.Point3d();
14650
+ javax.vecmath.Vector3d dir = new javax.vecmath.Vector3d();
14651
+
14652
+
1462714653 class PingThread extends Thread
1462814654 {
1462914655 boolean jump;
14656
+ boolean live;
1463014657
14631
- boolean mute;
14658
+ boolean mute = false;
1463214659
1463314660 // void JumpToTarget()
1463414661 // {
....@@ -14644,8 +14671,94 @@
1464414671 // only one thread!? synchronized
1464514672 void StepToTarget(boolean jump)
1464614673 {
14674
+ RigidBody.pos.x = 0;
14675
+ RigidBody.pos.y = 0;
14676
+ RigidBody.pos.z = 0;
14677
+ if (RigidBody.justclicked)
14678
+ {
14679
+// RigidBody.pos.x = (float)manipCamera.lookAt.x;
14680
+// RigidBody.pos.y = (float)manipCamera.lookAt.y;
14681
+// RigidBody.pos.z = (float)manipCamera.lookAt.z;
14682
+ // System.err.println("selected point = " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][1]) + " " + Trunk(selectedpoint.toParent[3][2]));
14683
+ CreateSelectedPoint();
14684
+
14685
+ RigidBody.pos.x = (float)selectedpoint.toParent[3][0];
14686
+ RigidBody.pos.y = (float)selectedpoint.toParent[3][1];
14687
+ RigidBody.pos.z = (float)selectedpoint.toParent[3][2];
14688
+
14689
+ RigidBody.wind.set(RigidBody.pos);
14690
+ RigidBody.wind.x -= (float)manipCamera.location.x;
14691
+ RigidBody.wind.y -= (float)manipCamera.location.y;
14692
+ RigidBody.wind.z -= (float)manipCamera.location.z;
14693
+ RigidBody.wind.normalize();
14694
+ }
14695
+
1464714696 if (mute)
1464814697 return;
14698
+
14699
+ if (capsLocked && manipCamera.viewCode == 0)
14700
+ {
14701
+ eye.x = manipCamera.location.x;
14702
+ eye.y = manipCamera.location.y + 0.25;
14703
+ eye.z = manipCamera.location.z;
14704
+
14705
+ dir.y = -1;
14706
+
14707
+ Ray ray = new Ray(eye, dir);
14708
+
14709
+ IntersectResult res = new IntersectResult();
14710
+ res.t = Double.POSITIVE_INFINITY;
14711
+
14712
+ tmp.set(targetLookAt);
14713
+ tmp.sub(manipCamera.location);
14714
+
14715
+ double dist = tmp.length();
14716
+
14717
+ tmp.normalize();
14718
+
14719
+ eye2.x = manipCamera.location.x + tmp.x * 0.25;
14720
+ eye2.y = manipCamera.location.y + 0.25;
14721
+ eye2.z = manipCamera.location.z + tmp.z * 0.25;
14722
+
14723
+ Ray ray2 = new Ray(eye2, dir);
14724
+
14725
+ IntersectResult res2 = new IntersectResult();
14726
+ res2.t = Double.POSITIVE_INFINITY;
14727
+
14728
+ if (object.intersect(ray, res) && object.intersect(ray2, res2) && Math.abs(res.t - res2.t) < 0.25)
14729
+ {
14730
+ //tmp.set(manipCamera.location);
14731
+
14732
+ manipCamera.location.x = ray.eyePoint.x + ray.viewDirection.x * res.t;
14733
+ manipCamera.location.y = ray.eyePoint.y + ray.viewDirection.y * res.t + 0.5;
14734
+ manipCamera.location.z = ray.eyePoint.z + ray.viewDirection.z * res.t;
14735
+
14736
+ //tmp.sub(manipCamera.location);
14737
+
14738
+ targetLookAt.x = ray2.eyePoint.x + ray2.viewDirection.x * res2.t;
14739
+ targetLookAt.y = ray2.eyePoint.y + ray2.viewDirection.y * res2.t + 0.5;
14740
+ targetLookAt.z = ray2.eyePoint.z + ray2.viewDirection.z * res2.t;
14741
+
14742
+ targetLookAt.sub(manipCamera.location);
14743
+ targetLookAt.normalize();
14744
+ targetLookAt.mul(dist);
14745
+ targetLookAt.add(manipCamera.location);
14746
+
14747
+ //if (tmp.dot(tmp) > 0.000001)
14748
+ // System.out.println("INTERSECTION " + manipCamera.location);
14749
+
14750
+ manipCamera.lookAt.set(targetLookAt);
14751
+
14752
+ tmp.x = res.n.x;
14753
+ tmp.y = res.n.y;
14754
+ tmp.z = res.n.z;
14755
+ tmp.x += res2.n.x;
14756
+ tmp.y += res2.n.y;
14757
+ tmp.z += res2.n.z;
14758
+ tmp.normalize();
14759
+ manipCamera.UP.set(tmp);
14760
+ }
14761
+ }
1464914762
1465014763 tmp.set(targetLookAt);
1465114764 tmp.sub(manipCamera.lookAt); // june 2014
....@@ -14684,7 +14797,7 @@
1468414797
1468514798 if (tmp.dot(tmp) > 1) // may 2014. far away: jump to target
1468614799 {
14687
- jump = true; // step = 1;
14800
+ // sep 2019 jump = true; // step = 1;
1468814801 }
1468914802
1469014803 if (OEILONCE && OEIL)
....@@ -14719,7 +14832,10 @@
1471914832 if (tmp.dot(tmp) < 0.00001)
1472014833 {
1472114834 zoomonce = false;
14835
+ live = false;
1472214836 }
14837
+ else
14838
+ live = true;
1472314839
1472414840 tmp.mul(step > step2 ? step : step2);
1472514841 }
....@@ -14746,7 +14862,7 @@
1474614862 {
1474714863 if (LOOKAT)
1474814864 manipCamera.lookAt.add(tmp);
14749
- if (OEIL)
14865
+ if (OEIL && !capsLocked)
1475014866 manipCamera.location.add(tmp);
1475114867
1475214868 {
....@@ -14761,7 +14877,10 @@
1476114877 lightCamera.computeTransform();
1476214878 }
1476314879 }
14764
- manipCamera.computeTransform();
14880
+ if (tmp.x != 0 || tmp.y != 0 || tmp.z != 0)
14881
+ {
14882
+ manipCamera.computeTransform();
14883
+ }
1476514884 }
1476614885 // ?????? mouseDown = true;
1476714886 //System.out.println("---------------- ---------- Paint " + tmp.length2());
....@@ -14858,8 +14977,28 @@
1485814977 PingThread pingthread = new PingThread();
1485914978 int delta = 1;
1486014979 int speed = 1;
14980
+ int walk = 8;
1486114981 boolean autorepeat = false;
1486214982
14983
+ void Walk()
14984
+ {
14985
+ manipCamera.BackForth(0, walk, 1000);
14986
+
14987
+ targetLookAt.set(manipCamera.lookAt);
14988
+ }
14989
+
14990
+ void ViewAngle(float dy)
14991
+ {
14992
+ double factor = Math.exp(-dy/300.0); // (1 + dy/100);
14993
+
14994
+ if (manipCamera.shaper_fovy * factor > 1 &&
14995
+ manipCamera.shaper_fovy * factor < 150)
14996
+ {
14997
+ manipCamera.shaper_fovy *= factor;
14998
+ //System.out.println("fovy = " + shaper_fovy);
14999
+ }
15000
+ }
15001
+
1486315002 void GoDown(int mod)
1486415003 {
1486515004 MODIFIERS |= COMMAND;
....@@ -14870,6 +15009,9 @@
1487015009 // if (isVR)
1487115010 // manipCamera.RotateInterest(0, speed);
1487215011 // else
15012
+ if (isVR)
15013
+ ViewAngle(-speed*delta);
15014
+ else
1487315015 manipCamera.Translate(0, -speed*delta, getWidth());
1487415016 }
1487515017 else
....@@ -14897,6 +15039,8 @@
1489715039
1489815040 void GoUp(int mod)
1489915041 {
15042
+ RigidBody.justclicked = true;
15043
+
1490015044 MODIFIERS |= COMMAND;
1490115045 /**/
1490215046 boolean isVR = (mouseMode&VR)!=0;
....@@ -14906,6 +15050,9 @@
1490615050 // if (isVR)
1490715051 // manipCamera.RotateInterest(0, -speed);
1490815052 // else
15053
+ if (isVR)
15054
+ ViewAngle(speed*delta);
15055
+ else
1490915056 manipCamera.Translate(0, speed*delta, getWidth());
1491015057 }
1491115058 else
....@@ -14936,13 +15083,13 @@
1493615083 MODIFIERS |= COMMAND;
1493715084 /**/
1493815085 if((mod&SHIFT) == SHIFT)
14939
- manipCamera.Translate(speed*delta, 0, getWidth());
15086
+ manipCamera.Translate(speed, 0, getWidth());
1494015087 else
1494115088 {
1494215089 if ((mouseMode&VR)!=0)
14943
- manipCamera.RotateInterest(-speed, 0);
15090
+ manipCamera.RotateInterest(-speed*manipCamera.shaper_fovy/90, 0);
1494415091 else
14945
- manipCamera.RotatePosition(speed, 0);
15092
+ manipCamera.RotatePosition(speed*manipCamera.shaper_fovy/90, 0);
1494615093 }
1494715094
1494815095 /**/
....@@ -14968,13 +15115,13 @@
1496815115 MODIFIERS |= COMMAND;
1496915116 /**/
1497015117 if((mod&SHIFT) == SHIFT)
14971
- manipCamera.Translate(-speed*delta, 0, getWidth());
15118
+ manipCamera.Translate(-speed, 0, getWidth());
1497215119 else
1497315120 {
1497415121 if ((mouseMode&VR)!=0)
14975
- manipCamera.RotateInterest(speed, 0);
15122
+ manipCamera.RotateInterest(speed*manipCamera.shaper_fovy/90, 0);
1497615123 else
14977
- manipCamera.RotatePosition(-speed, 0);
15124
+ manipCamera.RotatePosition(-speed*manipCamera.shaper_fovy/90, 0);
1497815125 }
1497915126
1498015127 /**/
....@@ -15121,6 +15268,11 @@
1512115268 if ((mouseMode & ZOOM) != 0)
1512215269 {
1512315270 //if ((mouseMode & BACKFORTH) != 0)
15271
+ if ((modifiersex & SHIFT) == SHIFT)
15272
+ {
15273
+ ViewAngle(dy);
15274
+ }
15275
+ else
1512415276 if ((mouseMode & VR) != 0)
1512515277 manipCamera.BackForth(dx, dy, getWidth());
1512615278 else
....@@ -15191,6 +15343,9 @@
1519115343
1519215344 public void mouseMoved(MouseEvent e)
1519315345 {
15346
+//object.editWindow.frame.
15347
+ setCursor(Cursor.getDefaultCursor());
15348
+
1519415349 //System.out.println("mouseMoved: " + e);
1519515350 if (isRenderer)
1519615351 return;
....@@ -15219,6 +15374,12 @@
1521915374
1522015375 public void mouseReleased(MouseEvent e)
1522115376 {
15377
+ if (isRenderer && !movingcamera)
15378
+ {
15379
+ RigidBody.justclicked = true;
15380
+ System.out.println("justclicked: " + e);
15381
+ }
15382
+
1522215383 Globals.MOUSEDRAGGED = false;
1522315384
1522415385 movingcamera = false;
....@@ -15435,8 +15596,18 @@
1543515596 float SATPOW = 1; // 2; // 0.5f;
1543615597 float BRIPOW = 1; // 0.5f; // 0.5f;
1543715598
15599
+static BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
15600
+
15601
+// Create a new blank cursor.
15602
+static Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(
15603
+ cursorImg, new Point(0, 0), "blank cursor");
15604
+
1543815605 public void keyPressed(int key)
1543915606 {
15607
+// Set the blank cursor to the JFrame.
15608
+//object.editWindow.frame.
15609
+ setCursor(blankCursor);
15610
+
1544015611 if (key >= '0' && key <= '5')
1544115612 clampbit = (key-'0');
1544215613
....@@ -15753,6 +15924,16 @@
1575315924 break;
1575415925 case 'l':
1575515926 lightMode ^= true;
15927
+ if (lightMode)
15928
+ {
15929
+ keepshadow = Globals.RENDERSHADOW;
15930
+ Globals.RENDERSHADOW = false;
15931
+ }
15932
+ else
15933
+ {
15934
+ Globals.RENDERSHADOW = keepshadow;
15935
+ }
15936
+
1575615937 Globals.lighttouched = true;
1575715938 manipCamera = renderCamera = lightMode ? lightCamera : eyeCamera;
1575815939 targetLookAt.set(manipCamera.lookAt);
....@@ -15802,6 +15983,10 @@
1580215983 case ENTER:
1580315984 // object.editWindow.ScreenFit(); // Edit();
1580415985 ToggleLive();
15986
+ if (capsLocked)
15987
+ {
15988
+ Globals.WALK ^= true;
15989
+ }
1580515990 break;
1580615991 case DELETE:
1580715992 ClearSelection();
....@@ -15838,17 +16023,23 @@
1583816023 object.GetWindow().refreshContents(true);
1583916024 break;
1584016025 case '{':
15841
- manipCamera.shaper_fovy /= 1.1;
16026
+ double factor = 1.1;
16027
+ if (manipCamera.shaper_fovy / factor > 0.1)
16028
+ manipCamera.shaper_fovy /= factor;
1584216029 System.out.println("FOV = " + manipCamera.shaper_fovy);
1584316030 repaint();
1584416031 break;
1584516032 case '}':
15846
- manipCamera.shaper_fovy *= 1.1;
16033
+ factor = 1.1;
16034
+ if (manipCamera.shaper_fovy * factor < 150)
16035
+ manipCamera.shaper_fovy *= factor;
1584716036 System.out.println("FOV = " + manipCamera.shaper_fovy);
1584816037 repaint();
1584916038 break;
1585016039 case '[':
15851
- manipCamera.shaper_fovy /= 1.01;
16040
+ factor = 1.01;
16041
+ if (manipCamera.shaper_fovy / factor > 0.1)
16042
+ manipCamera.shaper_fovy /= factor;
1585216043 if (false) //manipCamera.hAspect == 0)
1585316044 {
1585416045 double x = Math.tan(manipCamera.shaper_fovy * Math.PI / 180 / 2);
....@@ -15864,7 +16055,9 @@
1586416055 break;
1586516056 case ']':
1586616057 //manipCamera.shaper_fovy += (180 - manipCamera.shaper_fovy)*0.1;
15867
- manipCamera.shaper_fovy *= 1.01;
16058
+ factor = 1.01;
16059
+ if (manipCamera.shaper_fovy * factor < 150)
16060
+ manipCamera.shaper_fovy *= factor;
1586816061 if (false) //manipCamera.hAspect == 0)
1586916062 {
1587016063 double x = Math.tan(manipCamera.shaper_fovy * Math.PI / 180 / 2);
....@@ -16584,7 +16777,8 @@
1658416777
1658516778 public boolean mouseDrag(Event evt, int x, int y)
1658616779 {
16587
- //System.out.println("mouseDrag: " + evt);
16780
+ System.out.println("mouseDrag: " + evt);
16781
+ System.exit(0);
1658816782 /*
1658916783 drag = true;
1659016784 //System.out.println("Mouse DRAG");
....@@ -16703,6 +16897,7 @@
1670316897 public boolean mouseUp(Event evt, int x, int y)
1670416898 {
1670516899 System.out.println("mouseUp: " + evt);
16900
+ System.exit(0);
1670616901 /*
1670716902 locked = false;
1670816903 if (isRenderer)
....@@ -16973,7 +17168,7 @@
1697317168 return;
1697417169 }
1697517170
16976
- if (WIREFRAME)
17171
+ //if (WIREFRAME)
1697717172 gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL);
1697817173
1697917174 gl.glDisable(gl.GL_CULL_FACE);
....@@ -17073,6 +17268,8 @@
1707317268
1707417269 if (WIREFRAME)
1707517270 gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE);
17271
+ else
17272
+ gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL);
1707617273 }
1707717274
1707817275 private void DrawChecker(GL gl)
....@@ -17410,7 +17607,7 @@
1741017607
1741117608 float depth = depths[y * TEX_SIZE + x];
1741217609
17413
- if (pointselection && mouseMode == SELECT && depth != 0 && depth != 1)
17610
+ if (pointselection && (mouseMode & SELECT) == SELECT && depth != 0 && depth != 1)
1741417611 {
1741517612 pointselection = false;
1741617613
....@@ -18075,7 +18272,9 @@
1807518272 boolean OCCLUSION_CULLING = false; //true;
1807618273 public boolean lightMode = false;
1807718274
18078
- public boolean capsLocked = false; // VR
18275
+ private boolean keepshadow;
18276
+
18277
+ static public boolean capsLocked = false; // VR
1807918278
1808018279 static public int indexcount = 0;
1808118280 /*static*/ cColor vertexOcclusion = new cColor();