.. | .. |
---|
124 | 124 | static boolean LOCALTRANSFORM = false; |
---|
125 | 125 | static boolean FULLSCREEN = false; |
---|
126 | 126 | static boolean SUPPORT = true; |
---|
127 | | -static boolean INERTIA = true; |
---|
| 127 | +static boolean INERTIA = false; // true; |
---|
128 | 128 | static boolean FAST = false; |
---|
129 | 129 | static boolean SLOWPOSE = false; |
---|
130 | 130 | static boolean FOOTCONTACT = true; |
---|
.. | .. |
---|
250 | 250 | |
---|
251 | 251 | public javax.media.opengl.GL GetGL0() |
---|
252 | 252 | { |
---|
253 | | - return null; |
---|
| 253 | + return currentGL; |
---|
254 | 254 | } |
---|
255 | 255 | |
---|
256 | 256 | public int GenList() |
---|
.. | .. |
---|
1530 | 1530 | } |
---|
1531 | 1531 | } |
---|
1532 | 1532 | float b = 0; |
---|
1533 | | - if (obj.support != null && obj.link2master) |
---|
| 1533 | + if (obj.support != null && obj.Link2Support()) |
---|
1534 | 1534 | { |
---|
1535 | 1535 | b = 1; |
---|
1536 | 1536 | } |
---|
.. | .. |
---|
6962 | 6962 | short residu = 0; |
---|
6963 | 6963 | |
---|
6964 | 6964 | // wraparound workarounds |
---|
6965 | | - short fuck = (short) (buffer[i] & 0xFF); |
---|
| 6965 | + short ww = (short) (buffer[i] & 0xFF); |
---|
6966 | 6966 | /* |
---|
6967 | | - residu += (fuck%2); |
---|
6968 | | - if(fuck/2 < 256-residu/2) |
---|
| 6967 | + residu += (ww%2); |
---|
| 6968 | + if(ww/2 < 256-residu/2) |
---|
6969 | 6969 | { |
---|
6970 | | - fuck = (short)((fuck/2) + residu/2); |
---|
| 6970 | + ww = (short)((ww/2) + residu/2); |
---|
6971 | 6971 | if(residu == 2) |
---|
6972 | 6972 | residu = 0; |
---|
6973 | 6973 | } |
---|
6974 | 6974 | else |
---|
6975 | 6975 | { |
---|
6976 | 6976 | residu = 0; |
---|
6977 | | - fuck /= 2; |
---|
| 6977 | + ww /= 2; |
---|
6978 | 6978 | } |
---|
6979 | 6979 | */ |
---|
6980 | | - if (i < imglength / 3 || rnd.nextFloat() < 0.5 || fuck >= 254) |
---|
| 6980 | + if (i < imglength / 3 || rnd.nextFloat() < 0.5 || ww >= 254) |
---|
6981 | 6981 | { |
---|
6982 | | - fuck /= 2; |
---|
| 6982 | + ww /= 2; |
---|
6983 | 6983 | } else |
---|
6984 | 6984 | { |
---|
6985 | | - fuck = (short) ((fuck / 2) + fuck % 2); |
---|
| 6985 | + ww = (short) ((ww / 2) + ww % 2); |
---|
6986 | 6986 | } |
---|
6987 | 6987 | |
---|
6988 | | - buffer[i] = (byte) fuck; |
---|
| 6988 | + buffer[i] = (byte) ww; |
---|
6989 | 6989 | } |
---|
6990 | 6990 | //System.out.print(bytes[i] + " "); |
---|
6991 | 6991 | //if(buffer[i] >= 0 && buffer[i]<=eps-1) buffer[i] = eps; |
---|
.. | .. |
---|
10761 | 10761 | } |
---|
10762 | 10762 | /**/ |
---|
10763 | 10763 | |
---|
10764 | | - if (selection) |
---|
| 10764 | + boolean control = ((modifiers & CTRL) != 0); |
---|
| 10765 | + |
---|
| 10766 | + if (selection && (!Globals.isLIVE() || control)) |
---|
10765 | 10767 | { |
---|
10766 | 10768 | selectbuffer.display(); |
---|
10767 | 10769 | return; |
---|
.. | .. |
---|
14341 | 14343 | public void mouseClicked(MouseEvent e) |
---|
14342 | 14344 | { |
---|
14343 | 14345 | System.out.println("mouseClicked: " + e); |
---|
| 14346 | + System.exit(0); |
---|
14344 | 14347 | } |
---|
14345 | 14348 | |
---|
14346 | 14349 | public void mousePressed(MouseEvent e) |
---|
.. | .. |
---|
14652 | 14655 | boolean jump; |
---|
14653 | 14656 | boolean live; |
---|
14654 | 14657 | |
---|
14655 | | - boolean mute; |
---|
| 14658 | + boolean mute = false; |
---|
14656 | 14659 | |
---|
14657 | 14660 | // void JumpToTarget() |
---|
14658 | 14661 | // { |
---|
.. | .. |
---|
14668 | 14671 | // only one thread!? synchronized |
---|
14669 | 14672 | void StepToTarget(boolean jump) |
---|
14670 | 14673 | { |
---|
14671 | | - RigidBody.pos.x = (float)manipCamera.lookAt.x; |
---|
14672 | | - RigidBody.pos.y = (float)manipCamera.lookAt.y; |
---|
14673 | | - RigidBody.pos.z = (float)manipCamera.lookAt.z; |
---|
14674 | | -// RigidBody.wind.x = (float)manipCamera.right.x; |
---|
14675 | | -// RigidBody.wind.y = (float)manipCamera.right.y; |
---|
14676 | | -// RigidBody.wind.z = (float)manipCamera.right.z; |
---|
14677 | | - //RigidBody.wind.normalize(); |
---|
| 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 | + } |
---|
14678 | 14695 | |
---|
14679 | 14696 | if (mute) |
---|
14680 | 14697 | return; |
---|
.. | .. |
---|
15022 | 15039 | |
---|
15023 | 15040 | void GoUp(int mod) |
---|
15024 | 15041 | { |
---|
| 15042 | + RigidBody.justclicked = true; |
---|
| 15043 | + |
---|
15025 | 15044 | MODIFIERS |= COMMAND; |
---|
15026 | 15045 | /**/ |
---|
15027 | 15046 | boolean isVR = (mouseMode&VR)!=0; |
---|
.. | .. |
---|
15355 | 15374 | |
---|
15356 | 15375 | public void mouseReleased(MouseEvent e) |
---|
15357 | 15376 | { |
---|
| 15377 | + if (isRenderer && !movingcamera) |
---|
| 15378 | + { |
---|
| 15379 | + RigidBody.justclicked = true; |
---|
| 15380 | + System.out.println("justclicked: " + e); |
---|
| 15381 | + } |
---|
| 15382 | + |
---|
15358 | 15383 | Globals.MOUSEDRAGGED = false; |
---|
15359 | 15384 | |
---|
15360 | 15385 | movingcamera = false; |
---|
.. | .. |
---|
16752 | 16777 | |
---|
16753 | 16778 | public boolean mouseDrag(Event evt, int x, int y) |
---|
16754 | 16779 | { |
---|
16755 | | - //System.out.println("mouseDrag: " + evt); |
---|
| 16780 | + System.out.println("mouseDrag: " + evt); |
---|
| 16781 | + System.exit(0); |
---|
16756 | 16782 | /* |
---|
16757 | 16783 | drag = true; |
---|
16758 | 16784 | //System.out.println("Mouse DRAG"); |
---|
.. | .. |
---|
16871 | 16897 | public boolean mouseUp(Event evt, int x, int y) |
---|
16872 | 16898 | { |
---|
16873 | 16899 | System.out.println("mouseUp: " + evt); |
---|
| 16900 | + System.exit(0); |
---|
16874 | 16901 | /* |
---|
16875 | 16902 | locked = false; |
---|
16876 | 16903 | if (isRenderer) |
---|
.. | .. |
---|
17141 | 17168 | return; |
---|
17142 | 17169 | } |
---|
17143 | 17170 | |
---|
17144 | | - if (WIREFRAME) |
---|
| 17171 | + //if (WIREFRAME) |
---|
17145 | 17172 | gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL); |
---|
17146 | 17173 | |
---|
17147 | 17174 | gl.glDisable(gl.GL_CULL_FACE); |
---|
.. | .. |
---|
17241 | 17268 | |
---|
17242 | 17269 | if (WIREFRAME) |
---|
17243 | 17270 | gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE); |
---|
| 17271 | + else |
---|
| 17272 | + gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL); |
---|
17244 | 17273 | } |
---|
17245 | 17274 | |
---|
17246 | 17275 | private void DrawChecker(GL gl) |
---|