.. | .. |
---|
56 | 56 | static int CURRENTANTIALIAS = 0; // 1; |
---|
57 | 57 | /*static*/ boolean RENDERSHADOW = true; |
---|
58 | 58 | /*static*/ int RENDERPROGRAM = 2; // 0 == none, 1 == fast, 2 == normal |
---|
59 | | - static boolean ANIMATION = false; |
---|
60 | | - static String filename; |
---|
61 | 59 | |
---|
62 | 60 | boolean DISPLAYTEXT = false; |
---|
63 | 61 | //boolean REDUCETEXTURE = true; |
---|
.. | .. |
---|
92 | 90 | |
---|
93 | 91 | static int tickcount = 0; // slow pose issue |
---|
94 | 92 | |
---|
| 93 | +static boolean BUTTONLESSWHEEL = false; |
---|
| 94 | +static boolean ZOOMBOXMODE = false; |
---|
95 | 95 | static boolean BOXMODE = false; |
---|
96 | 96 | static boolean IMAGEFLIP = false; |
---|
97 | 97 | static boolean SMOOTHFOCUS = false; |
---|
.. | .. |
---|
223 | 223 | public boolean IsBoxMode() |
---|
224 | 224 | { |
---|
225 | 225 | return BOXMODE; |
---|
| 226 | + } |
---|
| 227 | + |
---|
| 228 | + public boolean IsZoomBoxMode() |
---|
| 229 | + { |
---|
| 230 | + return ZOOMBOXMODE; |
---|
226 | 231 | } |
---|
227 | 232 | |
---|
228 | 233 | public void ClearDepth() |
---|
.. | .. |
---|
1612 | 1617 | //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0); |
---|
1613 | 1618 | if (!material.multiply) |
---|
1614 | 1619 | { |
---|
1615 | | - display.color = color; |
---|
| 1620 | + display.color = material.color; |
---|
1616 | 1621 | display.saturation = material.modulation; |
---|
1617 | 1622 | } |
---|
1618 | 1623 | else |
---|
1619 | 1624 | { |
---|
1620 | | - display.color *= color*2; |
---|
| 1625 | + display.color *= material.color*2; |
---|
1621 | 1626 | display.saturation *= material.modulation*2; |
---|
1622 | 1627 | } |
---|
1623 | 1628 | |
---|
.. | .. |
---|
2168 | 2173 | public void ToggleBoxMode() |
---|
2169 | 2174 | { |
---|
2170 | 2175 | BOXMODE ^= true; |
---|
| 2176 | + } |
---|
| 2177 | + |
---|
| 2178 | + public void ToggleZoomBoxMode() |
---|
| 2179 | + { |
---|
| 2180 | + ZOOMBOXMODE ^= true; |
---|
2171 | 2181 | } |
---|
2172 | 2182 | |
---|
2173 | 2183 | public void ToggleSmoothFocus() |
---|
.. | .. |
---|
4196 | 4206 | |
---|
4197 | 4207 | com.sun.opengl.util.texture.Texture CompressTexture2(String name) |
---|
4198 | 4208 | { |
---|
| 4209 | + new Exception().printStackTrace(); |
---|
4199 | 4210 | System.exit(0); |
---|
4200 | 4211 | com.sun.opengl.util.texture.Texture texture = null; |
---|
4201 | 4212 | |
---|
.. | .. |
---|
9382 | 9393 | //gl.glFlush(); |
---|
9383 | 9394 | gl.glAccum(gl.GL_ACCUM, 1.0f / ACSIZE); |
---|
9384 | 9395 | |
---|
9385 | | - if (ANIMATION && ABORTED) |
---|
| 9396 | + if (Globals.ANIMATION && ABORTED) |
---|
9386 | 9397 | { |
---|
9387 | 9398 | System.err.println(" ABORTED FRAME"); |
---|
9388 | 9399 | break; |
---|
.. | .. |
---|
9412 | 9423 | setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); |
---|
9413 | 9424 | |
---|
9414 | 9425 | // save image |
---|
9415 | | - if (ANIMATION && !ABORTED) |
---|
| 9426 | + if (Globals.ANIMATION && !ABORTED) |
---|
9416 | 9427 | { |
---|
9417 | 9428 | VPwidth = viewport[2]; |
---|
9418 | 9429 | VPheight = viewport[3]; |
---|
.. | .. |
---|
9523 | 9534 | |
---|
9524 | 9535 | // imagecount++; |
---|
9525 | 9536 | |
---|
9526 | | - String fullname = filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext; |
---|
| 9537 | + String fullname = Globals.filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext; |
---|
9527 | 9538 | |
---|
9528 | 9539 | if (!BOXMODE) |
---|
9529 | 9540 | { |
---|
.. | .. |
---|
11247 | 11258 | { |
---|
11248 | 11259 | renderpass++; |
---|
11249 | 11260 | // System.out.println("Draw object... "); |
---|
| 11261 | + STEP = 1; |
---|
11250 | 11262 | if (FAST) // in case there is no script |
---|
11251 | | - STEP = 16; |
---|
| 11263 | + STEP = 8; |
---|
| 11264 | + |
---|
| 11265 | + if (CURRENTANTIALIAS == 0 || ACSIZE == 1) |
---|
| 11266 | + { |
---|
| 11267 | + STEP *= 4; |
---|
| 11268 | + } |
---|
11252 | 11269 | |
---|
11253 | 11270 | //object.FullInvariants(); |
---|
11254 | 11271 | |
---|
.. | .. |
---|
12735 | 12752 | "MUL final.y, fragment.texcoord[0].x, c256;" + |
---|
12736 | 12753 | "FLR final.x, final.y;" + |
---|
12737 | 12754 | "SUB final.y, final.y, final.x;" + |
---|
12738 | | - "MUL final.x, final.x, c256i;" + |
---|
| 12755 | + //"MUL final.x, final.x, c256i;" + |
---|
12739 | 12756 | "MOV final.z, zero.x;" + |
---|
12740 | 12757 | "MOV final.a, one.w;":"" |
---|
12741 | 12758 | ) + |
---|
.. | .. |
---|
12743 | 12760 | "MUL final.y, fragment.texcoord[0].y, c256;" + |
---|
12744 | 12761 | "FLR final.x, final.y;" + |
---|
12745 | 12762 | "SUB final.y, final.y, final.x;" + |
---|
12746 | | - "MUL final.x, final.x, c256i;" + |
---|
| 12763 | + //"MUL final.x, final.x, c256i;" + |
---|
12747 | 12764 | "MOV final.z, zero.x;" + |
---|
12748 | 12765 | "MOV final.a, one.w;":"" |
---|
12749 | 12766 | ) + |
---|
.. | .. |
---|
13523 | 13540 | |
---|
13524 | 13541 | //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio); |
---|
13525 | 13542 | |
---|
| 13543 | + if (BUTTONLESSWHEEL) |
---|
13526 | 13544 | if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30) |
---|
13527 | 13545 | { |
---|
13528 | 13546 | return; |
---|
.. | .. |
---|
13531 | 13549 | boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
13532 | 13550 | |
---|
13533 | 13551 | // TIMER |
---|
13534 | | - if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
| 13552 | + if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
13535 | 13553 | { |
---|
13536 | 13554 | keepboxmode = BOXMODE; |
---|
13537 | 13555 | keepsupport = SUPPORT; |
---|
.. | .. |
---|
13748 | 13766 | |
---|
13749 | 13767 | public void mouseDragged(MouseEvent e) |
---|
13750 | 13768 | { |
---|
| 13769 | + //System.out.println("mouseDragged: " + e); |
---|
13751 | 13770 | if (isRenderer) |
---|
13752 | 13771 | movingcamera = true; |
---|
13753 | 13772 | //if (drawing) |
---|
13754 | 13773 | //return; |
---|
13755 | | - //System.out.println("mouseDragged: " + e); |
---|
13756 | 13774 | if ((e.getModifiersEx() & CTRL) != 0 |
---|
13757 | 13775 | || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen()) |
---|
13758 | 13776 | { |
---|
.. | .. |
---|
13933 | 13951 | |
---|
13934 | 13952 | public void run() |
---|
13935 | 13953 | { |
---|
| 13954 | + new Exception().printStackTrace(); |
---|
13936 | 13955 | System.exit(0); |
---|
13937 | 13956 | for (;;) |
---|
13938 | 13957 | { |
---|
.. | .. |
---|
14287 | 14306 | public void mouseMoved(MouseEvent e) |
---|
14288 | 14307 | { |
---|
14289 | 14308 | //System.out.println("mouseMoved: " + e); |
---|
14290 | | - |
---|
14291 | 14309 | if (isRenderer) |
---|
14292 | 14310 | return; |
---|
14293 | 14311 | |
---|
.. | .. |
---|
15100 | 15118 | |
---|
15101 | 15119 | protected void processMouseMotionEvent(MouseEvent e) |
---|
15102 | 15120 | { |
---|
15103 | | - //System.out.println("processMouseMotionEvent: " + mouseMode); |
---|
15104 | | - if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15121 | + //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton()); |
---|
| 15122 | + //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15123 | + if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0) |
---|
15105 | 15124 | { |
---|
15106 | 15125 | mouseMoved(e); |
---|
15107 | 15126 | } else |
---|
.. | .. |
---|
15131 | 15150 | |
---|
15132 | 15151 | void SelectParent() |
---|
15133 | 15152 | { |
---|
| 15153 | + new Exception().printStackTrace(); |
---|
15134 | 15154 | System.exit(0); |
---|
15135 | 15155 | Composite group = (Composite) object; |
---|
15136 | 15156 | java.util.Vector selectees = new java.util.Vector(group.selection); |
---|
.. | .. |
---|
15154 | 15174 | |
---|
15155 | 15175 | void SelectChildren() |
---|
15156 | 15176 | { |
---|
| 15177 | + new Exception().printStackTrace(); |
---|
15157 | 15178 | System.exit(0); |
---|
15158 | 15179 | /* |
---|
15159 | 15180 | Composite group = (Composite) object; |
---|
.. | .. |
---|
16267 | 16288 | { |
---|
16268 | 16289 | if (!selection) |
---|
16269 | 16290 | { |
---|
| 16291 | + new Exception().printStackTrace(); |
---|
16270 | 16292 | System.exit(0); |
---|
16271 | 16293 | return; |
---|
16272 | 16294 | } |
---|