| Camera.java | ●●●●● patch | view | raw | blame | history | |
| CameraPane.java | ●●●●● patch | view | raw | blame | history | |
| GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
| ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
| Object3D.java | ●●●●● patch | view | raw | blame | history | |
| RandomNode.java | ●●●●● patch | view | raw | blame | history | |
| cFileSystemModel.java | ●●●●● patch | view | raw | blame | history | |
| cTree.java | ●●●●● patch | view | raw | blame | history | 
Camera.java
.. .. @@ -112,6 +112,7 @@ 112 112 113 113 material.shift = 90; 114 114 material.cameralight = 0.2f; 115  + material.shadowbias = 10;115 116 } 116 117 117 118 void setAspect(int width, int height) CameraPane.java
.. .. @@ -12952,12 +12952,7 @@ 12952 12952 "ADD temp.x, temp.x, one.x;" + 12953 12953 "MUL normal, normal, temp.xxxx;":"" 12954 12954 ) + 12955  - /**/12956  -//// Normalize("normal") +12957  -//// "MAX normal.z, eps.x, normal.z;" +12958  -// Normalize("normal") +12959  - "MOV normald, normal;" +12960  - "MOV normals, normal;" +12955  + /**/12961 12956 12962 12957 "MOV temp, fragment.texcoord[4];" + 12963 12958 .. .. @@ -12975,6 +12970,17 @@ 12975 12970 "XPD U, V, normal;" + 12976 12971 Normalize("U") + 12977 12972 12973  + "MOV temp, fragment.texcoord[0];" +12974  +12975  +// "MAD normal, -temp.x, U, normal;" +12976  +// "MAD normal, -temp.y, V, normal;" +12977  +// Normalize("normal") +12978  +12979  +//// "MAX normal.z, eps.x, normal.z;" +12980  +// Normalize("normal") +12981  + "MOV normald, normal;" +12982  + "MOV normals, normal;" +12983  +12978 12984 // parallax mapping 12979 12985 12980 12986 "DP3 temp2.x, V, eye;" + .. .. @@ -12987,17 +12993,15 @@ 12987 12993 "RCP temp2.w, temp2.w;" + 12988 12994 12989 12995 "SUB temp2.w, temp2.w, half;" + 12990  -// "SGE temp.x, temp2.w, eps.x;" +12991  -// "MUL temp2.w, temp2.w, temp.x;" +12996  + // "SGE temp.x, temp2.w, eps.x;" +12997  + // "MUL temp2.w, temp2.w, temp.x;" +12992 12998 12993  - //"MOV texSamp, U;" +12999  + // "MOV texSamp, U;" +12994 13000 12995 13001 "MUL temp2.z, temp2.z, temp2.w;" + 12996 13002 "MUL temp2.z, temp2.z, params7.z;" + // parallax 12997 13003 12998 13004 "MUL temp2, temp2, temp2.z;" + 12999  -13000  - "MOV temp, fragment.texcoord[0];" +13001 13005 13002 13006 "SUB temp, temp, temp2;" + 13003 13007 .. .. @@ -14732,8 +14736,8 @@ 14732 14736 } 14733 14737 } 14734 14738 PingThread pingthread = new PingThread(); 14735  - int delta = 5;14736  - int speed = 5;14739  + int delta = 2;14740  + int speed = 10;14737 14741 boolean autorepeat = false; 14738 14742 14739 14743 void GoDown(int mod) GroupEditor.java
.. .. @@ -765,11 +765,11 @@ 765 765 shadowYItem.addActionListener(this); 766 766 shadowZItem = menu.add(new MenuItem("Shadow Blue")); 767 767 shadowZItem.addActionListener(this); 768  - attributeItem = menu.add(new MenuItem("Attribute"));769  - attributeItem.addActionListener(this);770 768 771 769 if (Globals.ADVANCED) 772 770 { 771  + attributeItem = menu.add(new MenuItem("Attribute"));772  + attributeItem.addActionListener(this);773 773 menu.add("-"); 774 774 linkerItem = menu.add(new MenuItem("Linker")); 775 775 linkerItem.addActionListener(this); .. .. @@ -779,11 +779,18 @@ 779 779 pointflowItem.addActionListener(this); 780 780 } 781 781 menu.add("-"); 782  + textureRatioRItem = menu.add(new MenuItem("Texture Ratio Red"));783  + textureRatioRItem.addActionListener(this);784  + textureRatioGItem = menu.add(new MenuItem("Texture Ratio Green"));785  + textureRatioGItem.addActionListener(this);786  + textureRatioBItem = menu.add(new MenuItem("Texture Ratio Blue"));787  + textureRatioBItem.addActionListener(this);788  + menu.add("-");782 789 resetTransformItem = menu.add(new MenuItem("Reset Transform")); 783 790 resetTransformItem.addActionListener(this); 784 791 resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); 785 792 resetCentroidItem.addActionListener(this); 786  - resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));793  + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XZ"));787 794 resetCentroidXZItem.addActionListener(this); 788 795 transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); 789 796 transformGeometryItem.addActionListener(this); .. .. @@ -1217,7 +1224,7 @@ 1217 1224 torusButton.setToolTipText("Create torus"); 1218 1225 torusButton.addActionListener(this); 1219 1226 1220  - if (Globals.ADVANCED)1227  + if (false) //Globals.ADVANCED)1221 1228 { 1222 1229 oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); 1223 1230 kleinButton.setToolTipText("Create Klein bottle"); .. .. @@ -1493,7 +1500,7 @@ 1493 1500 1494 1501 void EditObject(Object3D obj) 1495 1502 { 1496  - assert(obj instanceof Composite);1503  + //assert(obj instanceof Composite);1497 1504 1498 1505 // if (obj.versionlist == null) 1499 1506 // { .. .. @@ -3612,6 +3619,18 @@ 3612 3619 { 3613 3620 TransformChildren(); 3614 3621 } else 3622  + if (source == textureRatioRItem)3623  + {3624  + TextureRatio(0);3625  + } else3626  + if (source == textureRatioGItem)3627  + {3628  + TextureRatio(1);3629  + } else3630  + if (source == textureRatioBItem)3631  + {3632  + TextureRatio(2);3633  + } else3615 3634 if (source == resetTransformItem) 3616 3635 { 3617 3636 ResetTransform(); .. .. @@ -3984,7 +4003,8 @@ 3984 4003 if (source == closeButton) 3985 4004 { 3986 4005 //System.out.println("CLOSE: " + buttonGroup.getSelection()); 3987  - Replace();4006  + if (copy.versionlist != null)4007  + Replace();3988 4008 3989 4009 cRadio ab; 3990 4010 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) .. .. @@ -4084,7 +4104,8 @@ 4084 4104 } else 4085 4105 if(source instanceof cRadio) 4086 4106 { 4087  - Replace();4107  + if (copy.versionlist != null)4108  + Replace();4088 4109 4089 4110 group.parent = keepparent; 4090 4111 group.attributes = 0; .. .. @@ -4137,7 +4158,7 @@ 4137 4158 */ 4138 4159 radio.layout.doClick(); 4139 4160 4140  - assert(copy instanceof Composite);4161  + //assert(copy instanceof Composite);4141 4162 4142 4163 if (copy.versionlist == null) 4143 4164 { .. .. @@ -4148,7 +4169,7 @@ 4148 4169 // and check if any of these nodes are reachable below the root. 4149 4170 Grafreed.grafreed.universe.TagObjects(copy, true); 4150 4171 4151  - if (copy.versionlist == null && !copy.HasTags())4172  + if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags())4152 4173 { 4153 4174 copy.versionlist = new Object3D[100]; 4154 4175 .. .. @@ -4275,6 +4296,18 @@ 4275 4296 refreshContents(); 4276 4297 } 4277 4298 4299  + void TextureRatio(int axis)4300  + {4301  + Object3D obj;4302  + for (Enumeration e = group.selection.elements(); e.hasMoreElements();)4303  + {4304  + obj = (Object3D)e.nextElement();4305  + obj.TextureRatio(axis);4306  + }4307  +4308  + refreshContents();4309  + }4310  +4278 4311 void ResetTransform() 4279 4312 { 4280 4313 ResetTransform(-1); .. .. @@ -4290,38 +4323,8 @@ 4290 4323 if (obj.toParent == null) 4291 4324 continue; 4292 4325 4293  - if (mask == -1)4294  - {4295  - if (obj instanceof Camera) // jan 20144296  - {4297  - LA.matIdentity(obj.toParent);4298  - LA.matIdentity(obj.fromParent);4299  - }4300  - else4301  - {4302  - obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent);4303  - obj.fromParent = null; // LA.matIdentity(obj.fromParent);4304  - }4305  - TouchTransform(obj);4306  - continue;4307  - }4308  - if ((mask&2) != 0) // Scale/rotation4309  - {4310  - obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;4311  - obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;4312  - obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0;4313  - obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;4314  - obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;4315  - obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;4316  - }4317  - if ((mask&1) != 0) // Translation4318  - {4319  - if (obj.toParent != null)4320  - {4321  - obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0;4322  - obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0;4323  - }4324  - }4326  + obj.ResetTransform(mask);4327  +4325 4328 if (obj.parent == null) 4326 4329 { 4327 4330 System.out.println("NULL PARENT!"); .. .. @@ -4829,6 +4832,12 @@ 4829 4832 for (int i=0; i<group.selection.size(); i++) 4830 4833 { 4831 4834 Object3D obj = group.selection.get(i); 4835  +4836  + if (obj.toParent == null)4837  + {4838  + obj.toParent = LA.newMatrix();4839  + obj.fromParent = LA.newMatrix();4840  + }4832 4841 4833 4842 LA.matTranslate(obj.toParent, i * scale, 0, 0); 4834 4843 LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); .. .. @@ -5412,7 +5421,7 @@ 5412 5421 } 5413 5422 } 5414 5423 5415  - rootButton.setEnabled(allComposites);5424  + rootButton.setEnabled(true); // allComposites);5416 5425 } 5417 5426 5418 5427 void refreshContents(boolean cp) .. .. @@ -6392,6 +6401,9 @@ 6392 6401 private MenuItem maxTexturesItem; 6393 6402 private MenuItem panoTexturesItem; 6394 6403 6404  + private MenuItem textureRatioRItem;6405  + private MenuItem textureRatioGItem;6406  + private MenuItem textureRatioBItem;6395 6407 private MenuItem resetCentroidItem; 6396 6408 private MenuItem resetCentroidXZItem; 6397 6409 private MenuItem resetTransformItem; ObjEditor.java
.. .. @@ -316,6 +316,8 @@ 316 316 objEditor.ctrlPanel.remove(setupPanel2); 317 317 objEditor.ctrlPanel.remove(objectCommandsPanel); 318 318 objEditor.ctrlPanel.remove(pushPanel); 319  + if (versionPanel != null)320  + objEditor.ctrlPanel.remove(versionPanel);319 321 //objEditor.ctrlPanel.remove(fillPanel); 320 322 321 323 //Remove(normalpushField); .. .. @@ -1163,6 +1165,7 @@ 1163 1165 cGridBag setupPanel2; 1164 1166 cGridBag objectCommandsPanel; 1165 1167 cGridBag pushPanel; 1168  + cGridBag versionPanel;1166 1169 cGridBag fillPanel; 1167 1170 1168 1171 JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) .. .. @@ -1409,9 +1412,14 @@ 1409 1412 oe.ctrlPanel.add(objectCommandsPanel); 1410 1413 oe.ctrlPanel.Return(); 1411 1414 1412  - pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons1415  + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH * 100, 1.1); // To have the buttons1413 1416 normalpushField = (cNumberSlider)pushPanel.getComponent(1); 1414  - //Return();1417  + if (false && copy.versionlist != null && copy.versionindex != -1)1418  + {1419  + oe.ctrlPanel.Return();1420  + versionPanel = AddSlider(oe.ctrlPanel, "Version", 0, copy.VersionCount() - 1, copy.versionindex);1421  + versionField = (cNumberSlider)versionPanel.getComponent(1);1422  + }1415 1423 1416 1424 oe.ctrlPanel.Return(); 1417 1425 .. .. @@ -2421,7 +2429,7 @@ 2421 2429 cameraField.setFloat(0.001); 2422 2430 specularField.setFloat(0.001); 2423 2431 fakedepthField.setFloat(0.001); 2424  - opacityField.setFloat(0.6);2432  + opacityField.setFloat(0.4);2425 2433 2426 2434 materialtouched = true; 2427 2435 applySelf(); .. .. @@ -4067,6 +4075,7 @@ 4067 4075 } else if (event.getSource() == link2masterCB) 4068 4076 { 4069 4077 copy.link2master ^= true; 4078  + objEditor.refreshContents();4070 4079 return; 4071 4080 } 4072 4081 if (event.getSource() == randomCB) .. .. @@ -4457,7 +4466,7 @@ 4457 4466 copy.versionindex -= 1; 4458 4467 4459 4468 if (copy.versionindex != -1) 4460  - CopyChanged();4469  + CopyChanged(copy);4461 4470 4462 4471 SetVersionStates(); 4463 4472 } .. .. @@ -4539,20 +4548,20 @@ 4539 4548 { 4540 4549 Object3D selection = new Object3D(); 4541 4550 4542  - for (int i = 0; i < copy.selection.size(); i++)4551  + for (int i = 0; i < objEditor.copy.selection.size(); i++)4543 4552 { 4544  - Object3D elem = copy.selection.elementAt(i);4553  + Object3D elem = objEditor.copy.selection.elementAt(i);4545 4554 4546  - Object3D obj = copy.GetObject(elem.GetUUID());4555  + Object3D obj = objEditor.copy.GetObject(elem.GetUUID());4547 4556 4548 4557 if (obj == null) 4549 4558 { 4550  - copy.selection.remove(i--);4559  + objEditor.copy.selection.remove(i--);4551 4560 } 4552 4561 else 4553 4562 { 4554 4563 selection.add(obj); 4555  - copy.selection.setElementAt(obj, i);4564  + objEditor.copy.selection.setElementAt(obj, i);4556 4565 } 4557 4566 } 4558 4567 .. .. @@ -4565,44 +4574,43 @@ 4565 4574 //refreshContents(false); 4566 4575 } 4567 4576 4568  - void CopyChanged()4577  + void CopyChanged(Object3D changed)4569 4578 { 4570  - Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]);4571  -4572  - SetVersionStates();4579  + Object3D obj = (Object3D)Grafreed.clone(changed.versionlist[copy.versionindex]);4573 4580 4574 4581 boolean temp = CameraPane.SWITCH; 4575 4582 CameraPane.SWITCH = false; 4576 4583 4577  - copy.ExtractBigData(Grafreed.grafreed.universe.versiontable);4584  + changed.ExtractBigData(Grafreed.grafreed.universe.versiontable);4578 4585 4579  - copy.clear();4586  + changed.clear();4580 4587 4581  - copy.skyboxname = obj.skyboxname;4582  - copy.skyboxext = obj.skyboxext;4588  + changed.skyboxname = obj.skyboxname;4589  + changed.skyboxext = obj.skyboxext;4583 4590 4584 4591 for (int i=0; i<obj.Size(); i++) 4585 4592 { 4586  - copy.add(obj.get(i));4593  + changed.add(obj.get(i));4587 4594 } 4588 4595 4589  - copy.RestoreBigData(Grafreed.grafreed.universe.versiontable);4596  + changed.RestoreBigData(Grafreed.grafreed.universe.versiontable);4590 4597 4591 4598 CameraPane.SWITCH = temp; 4592 4599 4593  - RefreshSelection();4600  + if (objEditor == this)4601  + RefreshSelection();4594 4602 //assert(hashtable.isEmpty()); 4595 4603 4596  - copy.Touch();4604  + objEditor.copy.Touch();4597 4605 4598 4606 ResetModel(); 4599  - copy.HardTouch(); // recompile?4607  + objEditor.copy.HardTouch(); // recompile?4600 4608 4601 4609 cRadio ab; 4602  - for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)4610  + for (java.util.Enumeration e = objEditor.buttonGroup.getElements(); e.hasMoreElements();)4603 4611 { 4604 4612 ab = (cRadio)e.nextElement(); 4605  - Object3D test = copy.GetObject(ab.object.GetUUID());4613  + Object3D test = objEditor.copy.GetObject(ab.object.GetUUID());4606 4614 //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); 4607 4615 if (test != null) 4608 4616 { .. .. @@ -4611,7 +4619,7 @@ 4611 4619 } 4612 4620 } 4613 4621 4614  - refreshContents(true);4622  + objEditor.refreshContents(true);4615 4623 } 4616 4624 4617 4625 cButton previousVersionButton; .. .. @@ -4625,15 +4633,7 @@ 4625 4633 4626 4634 int VersionCount() 4627 4635 { 4628  - int count = 0;4629  -4630  - for (int i = copy.versionlist.length; --i >= 0;)4631  - {4632  - if (copy.versionlist[i] != null)4633  - count++;4634  - }4635  -4636  - return count;4636  + return copy.VersionCount();4637 4637 } 4638 4638 4639 4639 public cGridBag versionSliderPane; .. .. @@ -4707,7 +4707,9 @@ 4707 4707 4708 4708 copy.versionindex -= 1; 4709 4709 4710  - CopyChanged();4710  + CopyChanged(copy);4711  +4712  + SetVersionStates();4711 4713 4712 4714 return true; 4713 4715 } .. .. @@ -4725,7 +4727,9 @@ 4725 4727 } 4726 4728 4727 4729 //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); 4728  - CopyChanged();4730  + CopyChanged(copy);4731  +4732  + SetVersionStates();4729 4733 4730 4734 return true; 4731 4735 } .. .. @@ -4762,10 +4766,12 @@ 4762 4766 4763 4767 copy.versionindex += 1; 4764 4768 4765  - CopyChanged();4769  + CopyChanged(copy);4766 4770 4767 4771 //if (!tab.user[tab.versionindex]) 4768 4772 // tab.graphs[tab.versionindex] = null; 4773  +4774  + SetVersionStates();4769 4775 } 4770 4776 4771 4777 void ImportGFD() .. .. @@ -5094,6 +5100,7 @@ 5094 5100 } 5095 5101 5096 5102 cNumberSlider versionSlider; 5103  + cNumberSlider versionField;5097 5104 5098 5105 public void stateChanged(ChangeEvent e) 5099 5106 { .. .. @@ -5110,12 +5117,26 @@ 5110 5117 if (version != -1 && copy.versionlist[version] != null) 5111 5118 { 5112 5119 copy.versionindex = version; 5113  - CopyChanged();5120  + CopyChanged(copy);5121  + SetVersionStates();5114 5122 } 5115 5123 5116 5124 return; 5117 5125 } 5118 5126 5127  + if (e.getSource() == versionField)5128  + {5129  + int version = versionField.getInteger();5130  +5131  + if (version != -1 && copy.versionindex != version && copy.versionlist[version] != null)5132  + {5133  + copy.versionindex = version;5134  + CopyChanged(copy);5135  + }5136  +5137  + return;5138  + }5139  +5119 5140 if (freezematerial) 5120 5141 { 5121 5142 return; .. .. @@ -5205,7 +5226,7 @@ 5205 5226 } 5206 5227 5207 5228 if (normalpushField != null) 5208  - copy.NORMALPUSH = (float)normalpushField.getFloat()/100;5229  + copy.NORMALPUSH = (float)normalpushField.getFloat() / 100;5209 5230 } 5210 5231 5211 5232 void SnapObject() .. .. @@ -5579,7 +5600,7 @@ 5579 5600 void ResetModel() 5580 5601 { 5581 5602 //assert(copy instanceof Composite); 5582  - Object3D /*Composite*/ group = (Object3D /*Composite*/) copy;5603  + Object3D /*Composite*/ group = (Object3D /*Composite*/) objEditor.copy;5583 5604 5584 5605 // necessary? group.selection = new Object3D(); // java.util.Vector(); 5585 5606 .. .. @@ -5590,14 +5611,14 @@ 5590 5611 //group.refreshEditWindow(); 5591 5612 //refreshContents(); 5592 5613 5593  - if (copy.selection == null)5614  + if (objEditor.copy.selection == null)5594 5615 { 5595  - copy.selection = new Object3D();5616  + objEditor.copy.selection = new Object3D();5596 5617 } 5597 5618 5598  - for (int j = 0; j < copy.selection.size(); j++)5619  + for (int j = 0; j < objEditor.copy.selection.size(); j++)5599 5620 { 5600  - Object3D item = copy.selection.get(j);5621  + Object3D item = objEditor.copy.selection.get(j);5601 5622 5602 5623 if (item instanceof cGroup && ((cGroup) item).transientlink) 5603 5624 { .. .. @@ -5606,15 +5627,15 @@ 5606 5627 5607 5628 if (item.count <= 1) // ??? == 0) 5608 5629 { 5609  - copy.selection.remove(item);5630  + objEditor.copy.selection.remove(item);5610 5631 } 5611 5632 } 5612 5633 5613 5634 boolean first = true; 5614 5635 5615  - for (int i = copy.selection.size(); --i >= 0;)5636  + for (int i = objEditor.copy.selection.size(); --i >= 0;)5616 5637 { 5617  - Object3D item = copy.selection.get(i);5638  + Object3D item = objEditor.copy.selection.get(i);5618 5639 5619 5640 if (item instanceof cGroup && ((cGroup) item).transientlink) 5620 5641 { Object3D.java
.. .. @@ -40,6 +40,19 @@ 40 40 41 41 ScriptNode scriptnode; 42 42 43  + int VersionCount()44  + {45  + int count = 0;46  +47  + for (int i = versionlist.length; --i >= 0;)48  + {49  + if (versionlist[i] != null)50  + count++;51  + }52  +53  + return count;54  + }55  +43 56 void InitOthers() 44 57 { 45 58 if (projectedVertices == null || projectedVertices.length <= 2) .. .. @@ -568,11 +581,11 @@ 568 581 } 569 582 } 570 583 571  - int memorysize;584  + transient int memorysize; // needs to be transient, dunno why572 585 573 586 int MemorySize() 574 587 { 575  - if (true) // memorysize == 0)588  + if (memorysize == 0)576 589 { 577 590 try 578 591 { .. .. @@ -3264,6 +3277,93 @@ 3264 3277 blockloop = false; 3265 3278 } 3266 3279 3280  + public void ResetTransform(int mask)3281  + {3282  + Object3D obj = this;3283  +3284  + if (mask == -1)3285  + {3286  + if (obj instanceof Camera) // jan 20143287  + {3288  + LA.matIdentity(obj.toParent);3289  + LA.matIdentity(obj.fromParent);3290  + }3291  + else3292  + {3293  + obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent);3294  + obj.fromParent = null; // LA.matIdentity(obj.fromParent);3295  + }3296  + return;3297  + }3298  +3299  + if ((mask&2) != 0) // Scale/rotation3300  + {3301  + obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;3302  + obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;3303  + obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0;3304  + obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;3305  + obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;3306  + obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;3307  + }3308  + if ((mask&1) != 0) // Translation3309  + {3310  + if (obj.toParent != null)3311  + {3312  + obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0;3313  + obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0;3314  + }3315  + }3316  + }3317  +3318  + public void TextureRatioTransform(int axis)3319  + {3320  + cTexture tex = GetTextures();3321  +3322  + com.sun.opengl.util.texture.TextureData texturedata = null;3323  +3324  + try3325  + {3326  + texturedata = Globals.theRenderer.GetTextureData(tex, false, texres);3327  + }3328  + catch (Exception e)3329  + {3330  + System.err.println("FAIL TextureRatio: " + this);3331  + }3332  +3333  + LA.matIdentity(Object3D.mat);3334  + Object3D.mat[axis][axis] = (double)texturedata.getWidth() / texturedata.getHeight();3335  +3336  + if (toParent == null)3337  + {3338  + toParent = LA.newMatrix();3339  + fromParent = LA.newMatrix();3340  + }3341  +3342  + ResetTransform(2);3343  +3344  + LA.matConcat(Object3D.mat, fromParent, fromParent);3345  + LA.matInvert(fromParent, toParent);3346  + }3347  +3348  + void TextureRatio(int axis)3349  + {3350  + if (blockloop)3351  + return;3352  +3353  + blockloop = true;3354  +3355  + TextureRatioTransform(axis);3356  +3357  + for (int i=Size(); --i>=0;)3358  + {3359  + Object3D v = get(i);3360  +3361  + v.TextureRatio(axis);3362  + }3363  +3364  + blockloop = false;3365  + }3366  +3267 3367 void TransformChildren() 3268 3368 { 3269 3369 if (toParent != null) .. .. @@ -5969,6 +6069,11 @@ 5969 6069 return parent.IsLive(); 5970 6070 } 5971 6071 6072  + boolean IsDynamic()6073  + {6074  + return live && bRep != null;6075  + }6076  +5972 6077 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) 5973 6078 { 5974 6079 Invariants(); // june 2013 .. .. @@ -6029,7 +6134,8 @@ 6029 6134 if (support != null) 6030 6135 support = support; 6031 6136 6032  - boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);6137  + boolean usecalllists = !IsDynamic() &&6138  + IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);6033 6139 //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); 6034 6140 6035 6141 //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. .. .. @@ -8075,10 +8181,10 @@ 8075 8181 } // + super.toString(); 8076 8182 //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName(); 8077 8183 8078  - if (!Globals.ADVANCED)8079  - return objname;8184  +// if (!Globals.ADVANCED)8185  +// return objname;8080 8186 8081  - return objname + " " + System.identityHashCode(this);8187  + return objname + " " + System.identityHashCode(this); // + GetUUID()8082 8188 } 8083 8189 8084 8190 public int hashCode() RandomNode.java
.. .. @@ -25,9 +25,14 @@ 25 25 // return 1; 26 26 // } 27 27 28  + boolean IsSwitch()29  + {30  + return CameraPane.SWITCH && !this.link2master;31  + }32  +28 33 public int size() 29 34 { 30  - if (CameraPane.SWITCH)35  + if (IsSwitch())31 36 { 32 37 if (super.size() > 0) 33 38 return 1; .. .. @@ -88,7 +93,7 @@ 88 93 89 94 public Object3D reserve(int i) 90 95 { 91  - if (!CameraPane.SWITCH)96  + if (!IsSwitch())92 97 return super.reserve(i); 93 98 94 99 //assert(rnd == -1); .. .. @@ -160,7 +165,7 @@ 160 165 161 166 public void release(int i) 162 167 { 163  - if (!CameraPane.SWITCH)168  + if (!IsSwitch())164 169 { 165 170 super.release(i); 166 171 return; cFileSystemModel.java
.. .. @@ -110,8 +110,9 @@ 110 110 hasFocus); 111 111 112 112 String valueString = value.toString(); 113  + String lcString = valueString.toLowerCase();113 114 114  - if (valueString.toLowerCase().endsWith(".gfd") || valueString.toLowerCase().endsWith(".obj") || valueString.toLowerCase().endsWith(".3ds"))115  + if (lcString.endsWith(".gfd") || lcString.endsWith(".obj") || lcString.endsWith(".3ds"))115 116 { 116 117 if (true) 117 118 { .. .. @@ -138,7 +139,7 @@ 138 139 139 140 if (rendererIcon == null) 140 141 { 141  - rendererIcon = new javax.swing.ImageIcon();142  + rendererIcon = ObjEditor.GetIcon("icons/primitives.png");142 143 } 143 144 144 145 icons.put(valueTruncated, rendererIcon); cTree.java
.. .. @@ -21,7 +21,7 @@ 21 21 public void mousePressed(MouseEvent e) 22 22 { 23 23 //if (e.isPopupTrigger()) // Works only on mouse released on Windows. 24  - if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)24  + if (e.getModifiers() == InputEvent.BUTTON3_MASK)25 25 { 26 26 int row = getClosestRowForLocation(e.getX(), e.getY()); 27 27 if (!isRowSelected(row))