.. | .. |
---|
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 | |
---|
.. | .. |
---|
12586 | 12603 | "MAX ndotl.x, ndotl.x, -ndotl.x;" + |
---|
12587 | 12604 | |
---|
12588 | 12605 | "SUB temp.x, one.x, ndotl.x;" + |
---|
12589 | | - "ADD temp.x, temp.x, options2.z;" + // lightsheen |
---|
12590 | | - "ADD temp.y, one.y, options2.y;" + // sursurface |
---|
| 12606 | + // Tuning for default skin |
---|
| 12607 | + //"ADD temp.x, temp.x, options2.z;" + // lightsheen |
---|
| 12608 | + "MAD temp.x, options2.z, half.y, temp.x;" + // lightsheen |
---|
| 12609 | + "ADD temp.y, one.y, options2.y;" + // subsurface |
---|
12591 | 12610 | "MUL temp.x, temp.x, temp.y;" + |
---|
12592 | 12611 | |
---|
12593 | 12612 | "MUL saturation, saturation, temp.xxxx;" + |
---|
.. | .. |
---|
12735 | 12754 | "MUL final.y, fragment.texcoord[0].x, c256;" + |
---|
12736 | 12755 | "FLR final.x, final.y;" + |
---|
12737 | 12756 | "SUB final.y, final.y, final.x;" + |
---|
12738 | | - "MUL final.x, final.x, c256i;" + |
---|
| 12757 | + //"MUL final.x, final.x, c256i;" + |
---|
12739 | 12758 | "MOV final.z, zero.x;" + |
---|
12740 | 12759 | "MOV final.a, one.w;":"" |
---|
12741 | 12760 | ) + |
---|
.. | .. |
---|
12743 | 12762 | "MUL final.y, fragment.texcoord[0].y, c256;" + |
---|
12744 | 12763 | "FLR final.x, final.y;" + |
---|
12745 | 12764 | "SUB final.y, final.y, final.x;" + |
---|
12746 | | - "MUL final.x, final.x, c256i;" + |
---|
| 12765 | + //"MUL final.x, final.x, c256i;" + |
---|
12747 | 12766 | "MOV final.z, zero.x;" + |
---|
12748 | 12767 | "MOV final.a, one.w;":"" |
---|
12749 | 12768 | ) + |
---|
.. | .. |
---|
13523 | 13542 | |
---|
13524 | 13543 | //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio); |
---|
13525 | 13544 | |
---|
| 13545 | + if (BUTTONLESSWHEEL) |
---|
13526 | 13546 | if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30) |
---|
13527 | 13547 | { |
---|
13528 | 13548 | return; |
---|
.. | .. |
---|
13531 | 13551 | boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
13532 | 13552 | |
---|
13533 | 13553 | // TIMER |
---|
13534 | | - if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
| 13554 | + if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
13535 | 13555 | { |
---|
13536 | 13556 | keepboxmode = BOXMODE; |
---|
13537 | 13557 | keepsupport = SUPPORT; |
---|
.. | .. |
---|
13748 | 13768 | |
---|
13749 | 13769 | public void mouseDragged(MouseEvent e) |
---|
13750 | 13770 | { |
---|
| 13771 | + //System.out.println("mouseDragged: " + e); |
---|
13751 | 13772 | if (isRenderer) |
---|
13752 | 13773 | movingcamera = true; |
---|
13753 | 13774 | //if (drawing) |
---|
13754 | 13775 | //return; |
---|
13755 | | - //System.out.println("mouseDragged: " + e); |
---|
13756 | 13776 | if ((e.getModifiersEx() & CTRL) != 0 |
---|
13757 | 13777 | || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen()) |
---|
13758 | 13778 | { |
---|
.. | .. |
---|
13933 | 13953 | |
---|
13934 | 13954 | public void run() |
---|
13935 | 13955 | { |
---|
| 13956 | + new Exception().printStackTrace(); |
---|
13936 | 13957 | System.exit(0); |
---|
13937 | 13958 | for (;;) |
---|
13938 | 13959 | { |
---|
.. | .. |
---|
14287 | 14308 | public void mouseMoved(MouseEvent e) |
---|
14288 | 14309 | { |
---|
14289 | 14310 | //System.out.println("mouseMoved: " + e); |
---|
14290 | | - |
---|
14291 | 14311 | if (isRenderer) |
---|
14292 | 14312 | return; |
---|
14293 | 14313 | |
---|
.. | .. |
---|
15100 | 15120 | |
---|
15101 | 15121 | protected void processMouseMotionEvent(MouseEvent e) |
---|
15102 | 15122 | { |
---|
15103 | | - //System.out.println("processMouseMotionEvent: " + mouseMode); |
---|
15104 | | - if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15123 | + //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton()); |
---|
| 15124 | + //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15125 | + if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0) |
---|
15105 | 15126 | { |
---|
15106 | 15127 | mouseMoved(e); |
---|
15107 | 15128 | } else |
---|
.. | .. |
---|
15131 | 15152 | |
---|
15132 | 15153 | void SelectParent() |
---|
15133 | 15154 | { |
---|
| 15155 | + new Exception().printStackTrace(); |
---|
15134 | 15156 | System.exit(0); |
---|
15135 | 15157 | Composite group = (Composite) object; |
---|
15136 | 15158 | java.util.Vector selectees = new java.util.Vector(group.selection); |
---|
.. | .. |
---|
15154 | 15176 | |
---|
15155 | 15177 | void SelectChildren() |
---|
15156 | 15178 | { |
---|
| 15179 | + new Exception().printStackTrace(); |
---|
15157 | 15180 | System.exit(0); |
---|
15158 | 15181 | /* |
---|
15159 | 15182 | Composite group = (Composite) object; |
---|
.. | .. |
---|
16267 | 16290 | { |
---|
16268 | 16291 | if (!selection) |
---|
16269 | 16292 | { |
---|
| 16293 | + new Exception().printStackTrace(); |
---|
16270 | 16294 | System.exit(0); |
---|
16271 | 16295 | return; |
---|
16272 | 16296 | } |
---|