| .. | .. | 
|---|
| 1890 | 1890 |      void PushMatrix(double[][] matrix) | 
|---|
| 1891 | 1891 |      { | 
|---|
| 1892 | 1892 |      //    GrafreeD.tracein(matrix); | 
|---|
| 1893 |  | -        PushMatrix(matrix,1);  | 
|---|
 | 1893 | +        PushMatrix(matrix, 1);  | 
|---|
| 1894 | 1894 |      } | 
|---|
| 1895 | 1895 |       | 
|---|
| 1896 | 1896 |      void PushMatrix() | 
|---|
| .. | .. | 
|---|
| 9335 | 9335 |           | 
|---|
| 9336 | 9336 |          if (renderCamera != lightCamera) | 
|---|
| 9337 | 9337 |          //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 9338 |  | -            LA.matConcat(matrix, parentcam.GlobalTransformInv(), matrix);  | 
|---|
 | 9338 | +            LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);  | 
|---|
| 9339 | 9339 |           | 
|---|
| 9340 | 9340 |  //            LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix); | 
|---|
| 9341 | 9341 |               | 
|---|
| .. | .. | 
|---|
| 9351 | 9351 |               | 
|---|
| 9352 | 9352 |          if (renderCamera != lightCamera) | 
|---|
| 9353 | 9353 |          //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 9354 |  | -            LA.matConcat(parentcam.GlobalTransform(), matrix, matrix);  | 
|---|
 | 9354 | +            LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);  | 
|---|
| 9355 | 9355 |   | 
|---|
| 9356 | 9356 |  //            LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix); | 
|---|
| 9357 | 9357 |               | 
|---|
| .. | .. | 
|---|
| 10550 | 10550 |  //        if (parentcam != renderCamera) // not a light | 
|---|
| 10551 | 10551 |          if (cam != lightCamera) | 
|---|
| 10552 | 10552 |              //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 10553 |  | -                LA.matConcat(matrix, parentcam.GlobalTransformInv(), matrix);  | 
|---|
 | 10553 | +                LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);  | 
|---|
| 10554 | 10554 |               | 
|---|
| 10555 | 10555 |              for (int j = 0; j < 4; j++) | 
|---|
| 10556 | 10556 |              { | 
|---|
| .. | .. | 
|---|
| 10565 | 10565 |  //        if (parentcam != renderCamera) // not a light | 
|---|
| 10566 | 10566 |          if (cam != lightCamera) | 
|---|
| 10567 | 10567 |              //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 10568 |  | -                LA.matConcat(parentcam.GlobalTransform(), matrix, matrix);  | 
|---|
 | 10568 | +                LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);  | 
|---|
| 10569 | 10569 |           | 
|---|
| 10570 | 10570 |              //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix); | 
|---|
| 10571 | 10571 |               | 
|---|
| .. | .. | 
|---|
| 10959 | 10959 |   | 
|---|
| 10960 | 10960 |  //            if (cam != lightCamera) | 
|---|
| 10961 | 10961 |              //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 10962 |  | -                LA.xformDir(lightposition, parentcam.GlobalTransformInv(), lightposition); // may 2013  | 
|---|
 | 10962 | +                LA.xformDir(lightposition, parentcam.GlobalTransform(), lightposition); // may 2013  | 
|---|
| 10963 | 10963 |          } | 
|---|
| 10964 | 10964 |           | 
|---|
| 10965 | 10965 |          LA.xformDir(lightposition, cam.toScreen, lightposition); | 
|---|
| .. | .. | 
|---|
| 10981 | 10981 |              { | 
|---|
| 10982 | 10982 |                  if (cam != lightCamera) | 
|---|
| 10983 | 10983 |                  //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 10984 |  | -                   LA.xformDir(light0, parentcam.GlobalTransformInv(), light0); // may 2013  | 
|---|
 | 10984 | +                   LA.xformDir(light0, parentcam.GlobalTransform(), light0); // may 2013  | 
|---|
| 10985 | 10985 |              } | 
|---|
| 10986 | 10986 |               | 
|---|
| 10987 | 10987 |              LA.xformPos(light0, cam.toScreen, light0); | 
|---|
| .. | .. | 
|---|
| 11894 | 11894 |              for (int i = tp.size(); --i >= 0;) | 
|---|
| 11895 | 11895 |              { | 
|---|
| 11896 | 11896 |                  //for (int count = tp.get(i).GetTransformCount(); --count>=0;) | 
|---|
| 11897 |  | -                    LA.xformPos(light, tp.get(i).GlobalTransformInv(), light);  | 
|---|
 | 11897 | +                    LA.xformPos(light, tp.get(i).GlobalTransform(), light);  | 
|---|
| 11898 | 11898 |              } | 
|---|
| 11899 | 11899 |   | 
|---|
| 11900 | 11900 |   | 
|---|
| .. | .. | 
|---|
| 11912 | 11912 |              } | 
|---|
| 11913 | 11913 |               | 
|---|
| 11914 | 11914 |          //for (int count = parentcam.GetTransformCount(); --count>=0;) | 
|---|
| 11915 |  | -            LA.xformPos(light, parentcam.GlobalTransformInv(), light); // may 2013  | 
|---|
 | 11915 | +            LA.xformPos(light, parentcam.GlobalTransform(), light); // may 2013  | 
|---|
| 11916 | 11916 |   | 
|---|
| 11917 | 11917 |              LA.xformPos(light, renderCamera.toScreen, light); | 
|---|
| 11918 | 11918 |               | 
|---|
| .. | .. | 
|---|
| 13833 | 13833 |       | 
|---|
| 13834 | 13834 |      public void mouseDragged(MouseEvent e) | 
|---|
| 13835 | 13835 |      { | 
|---|
 | 13836 | +        Globals.MOUSEDRAGGED = true;  | 
|---|
 | 13837 | +          | 
|---|
| 13836 | 13838 |          //System.out.println("mouseDragged: " + e); | 
|---|
| 13837 | 13839 |          if (isRenderer) | 
|---|
| 13838 | 13840 |              movingcamera = true; | 
|---|
| .. | .. | 
|---|
| 14398 | 14400 |   | 
|---|
| 14399 | 14401 |      public void mouseReleased(MouseEvent e) | 
|---|
| 14400 | 14402 |      { | 
|---|
 | 14403 | +        Globals.MOUSEDRAGGED = false;  | 
|---|
 | 14404 | +          | 
|---|
| 14401 | 14405 |          movingcamera = false; | 
|---|
| 14402 | 14406 |          X = Y = 0; | 
|---|
| 14403 | 14407 |          //System.out.println("mouseReleased: " + e); | 
|---|
| .. | .. | 
|---|
| 15513 | 15517 |                  { | 
|---|
| 15514 | 15518 |                      switch (object.selection.get(0).hitSomething) | 
|---|
| 15515 | 15519 |                      { | 
|---|
| 15516 |  | -                        case Object3D.hitCenter: gr.setColor(Color.pink); break;  | 
|---|
| 15517 |  | -                        case Object3D.hitRotate: gr.setColor(Color.green); break;  | 
|---|
| 15518 |  | -                        case Object3D.hitScale: gr.setColor(Color.cyan); break;  | 
|---|
 | 15520 | +                        case Object3D.hitCenter: gr.setColor(Color.pink);  | 
|---|
 | 15521 | +                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);  | 
|---|
 | 15522 | +                            break;  | 
|---|
 | 15523 | +                        case Object3D.hitRotate: gr.setColor(Color.yellow);  | 
|---|
 | 15524 | +                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);  | 
|---|
 | 15525 | +                        break;  | 
|---|
 | 15526 | +                        case Object3D.hitScale: gr.setColor(Color.cyan);  | 
|---|
 | 15527 | +                            gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);  | 
|---|
 | 15528 | +                        break;  | 
|---|
| 15519 | 15529 |                      } | 
|---|
| 15520 | 15530 |                       | 
|---|
| 15521 |  | -                    gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);  | 
|---|
| 15522 | 15531 |                  } | 
|---|
| 15523 | 15532 |              } | 
|---|
| 15524 | 15533 |          } | 
|---|
 
| .. | .. | 
|---|
| 871 | 871 |              } else if(e.getSource() == liveCB) | 
|---|
| 872 | 872 |              { | 
|---|
| 873 | 873 |                  cameraView.ToggleLive(); | 
|---|
 | 874 | +                refreshContents(false);  | 
|---|
| 874 | 875 |              } | 
|---|
| 875 | 876 |              else if(e.getSource() == supportCB) | 
|---|
| 876 | 877 |              { | 
|---|
| .. | .. | 
|---|
| 1278 | 1279 |  		memoryItem.addActionListener(this); | 
|---|
| 1279 | 1280 |  		menu.add(analyzeItem = new MenuItem("Analyze")); | 
|---|
| 1280 | 1281 |  		analyzeItem.addActionListener(this); | 
|---|
| 1281 |  | -		menu.add(dumpItem = new MenuItem("Dump"));  | 
|---|
 | 1282 | +		menu.add(dumpItem = new MenuItem("Print"));  | 
|---|
| 1282 | 1283 |  		dumpItem.addActionListener(this); | 
|---|
| 1283 | 1284 |  //		menu.add(pathItem = new MenuItem("From-to path")); | 
|---|
| 1284 | 1285 |  //		pathItem.addActionListener(this); | 
|---|
| .. | .. | 
|---|
| 4320 | 4321 |  			//case 702: // Event.LIST_DESELECT | 
|---|
| 4321 | 4322 |  			group.deselectAll(); | 
|---|
| 4322 | 4323 |  			TreePath tps[] = objEditor.jTree.getSelectionPaths(); | 
|---|
| 4323 |  | -			objEditor.ClearInfo(); // .GetMaterial());  | 
|---|
| 4324 | 4324 |  			if (tps != null) | 
|---|
| 4325 | 4325 |  			{ | 
|---|
| 4326 | 4326 |  				for (int i=0; i < tps.length; i++) | 
|---|
| .. | .. | 
|---|
| 4330 | 4330 |  					//if (child.parent != null) | 
|---|
| 4331 | 4331 |  						//child.parent.addSelectee(child); | 
|---|
| 4332 | 4332 |  					group.addSelectee(child); | 
|---|
| 4333 |  | -					objEditor.SetMaterial(child); // .GetMaterial());  | 
|---|
| 4334 |  | -					objEditor.AddInfo(child, this, true); // .GetMaterial());  | 
|---|
| 4335 |  | -            System.err.println("info : " + child.GetPath());  | 
|---|
| 4336 | 4333 |  				} | 
|---|
| 4337 | 4334 |  			} | 
|---|
| 4338 | 4335 |  //			else | 
|---|
| .. | .. | 
|---|
| 4342 | 4339 |  //            System.err.println("info : " + group.GetPath()); | 
|---|
| 4343 | 4340 |  //                        } | 
|---|
| 4344 | 4341 |  			 | 
|---|
| 4345 |  | -                        objEditor.SetText(); // jan 2014  | 
|---|
| 4346 |  | -                          | 
|---|
| 4347 | 4342 |  			if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) | 
|---|
| 4348 | 4343 |  				CameraPane.flash = true; | 
|---|
| 4349 | 4344 |                           | 
|---|
| .. | .. | 
|---|
| 4367 | 4362 |  		 | 
|---|
| 4368 | 4363 |  		freezemodel = false; | 
|---|
| 4369 | 4364 |  	} | 
|---|
 | 4365 | +          | 
|---|
 | 4366 | +        void refreshContents(boolean cp)  | 
|---|
 | 4367 | +        {  | 
|---|
 | 4368 | +            if (!Globals.MOUSEDRAGGED)  | 
|---|
 | 4369 | +            {  | 
|---|
 | 4370 | +                objEditor.ClearInfo(); // .GetMaterial());  | 
|---|
 | 4371 | +  | 
|---|
 | 4372 | +                for (int i=0; i < group.selection.size(); i++)  | 
|---|
 | 4373 | +                {  | 
|---|
 | 4374 | +                    Object3D child = (Object3D) group.selection.reserve(i);  | 
|---|
 | 4375 | +  | 
|---|
 | 4376 | +                    objEditor.SetMaterial(child);  | 
|---|
 | 4377 | +                    objEditor.AddInfo(child, this, true);  | 
|---|
 | 4378 | +    System.err.println("info : " + child.GetPath());  | 
|---|
 | 4379 | +  | 
|---|
 | 4380 | +                    group.selection.release(i);  | 
|---|
 | 4381 | +                }  | 
|---|
 | 4382 | +  | 
|---|
 | 4383 | +                objEditor.SetText(); // jan 2014  | 
|---|
 | 4384 | +            }  | 
|---|
 | 4385 | +                          | 
|---|
 | 4386 | +            super.refreshContents(cp);  | 
|---|
 | 4387 | +        }  | 
|---|
| 4370 | 4388 |  	 | 
|---|
| 4371 | 4389 |  	void linkSomething(Object3D thing) | 
|---|
| 4372 | 4390 |  	{ | 
|---|
 
| .. | .. | 
|---|
| 7102 | 7102 |              spot.translate(32, 32); | 
|---|
| 7103 | 7103 |              spotw = spot.x + spot.width; | 
|---|
| 7104 | 7104 |              spoth = spot.y + spot.height; | 
|---|
| 7105 |  | -            info.g.setColor(Color.blue);  | 
|---|
 | 7105 | +            info.g.setColor(Color.cyan);  | 
|---|
| 7106 | 7106 |              info.g.fillRect(spot.x, spot.y, spot.width, spot.height); | 
|---|
| 7107 | 7107 |  //            if (CameraPane.Xmin > spot.x) | 
|---|
| 7108 | 7108 |  //            { | 
|---|
| .. | .. | 
|---|
| 7120 | 7120 |  //            { | 
|---|
| 7121 | 7121 |  //                CameraPane.Ymax = spoth; | 
|---|
| 7122 | 7122 |  //            } | 
|---|
| 7123 |  | -            // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);  | 
|---|
| 7124 |  | -            //info.g.drawLine(spotw, spoth, spotw - 15, spoth);  | 
|---|
 | 7123 | +            // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15  | 
|---|
 | 7124 | +            //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15  | 
|---|
| 7125 | 7125 |              spot.translate(0, -32); | 
|---|
| 7126 |  | -            info.g.setColor(Color.green);  | 
|---|
 | 7126 | +            info.g.setColor(Color.yellow);  | 
|---|
| 7127 | 7127 |              info.g.fillRect(spot.x, spot.y, spot.width, spot.height); | 
|---|
 | 7128 | +            info.g.setColor(Color.green);  | 
|---|
| 7128 | 7129 |  //            if (CameraPane.Xmin > spot.x) | 
|---|
| 7129 | 7130 |  //            { | 
|---|
| 7130 | 7131 |  //                CameraPane.Xmin = spot.x; | 
|---|
| .. | .. | 
|---|
| 7442 | 7443 |                  switch (info.pane.RenderCamera().viewCode) | 
|---|
| 7443 | 7444 |                  { | 
|---|
| 7444 | 7445 |                      case 3: // '\001' | 
|---|
| 7445 |  | -                        if (modified)  | 
|---|
 | 7446 | +                        if (modified || opposite)  | 
|---|
| 7446 | 7447 |                          { | 
|---|
| 7447 | 7448 |                              //LA.matScale(toParent, 1, hScale, vScale); | 
|---|
| 7448 | 7449 |                              LA.matScale(toParent, totalScale, 1, 1); | 
|---|
| 7449 | 7450 |                          } // vScale, 1); | 
|---|
| 7450 | 7451 |                          else | 
|---|
| 7451 | 7452 |                          { | 
|---|
| 7452 |  | -                            LA.matScale(toParent, totalScale, totalScale, totalScale);  | 
|---|
 | 7453 | +                            LA.matScale(toParent, 1, totalScale, totalScale);  | 
|---|
| 7453 | 7454 |                          } // vScale, 1); | 
|---|
| 7454 | 7455 |                          break; | 
|---|
| 7455 | 7456 |   | 
|---|
| 7456 | 7457 |                      case 2: // '\002' | 
|---|
| 7457 |  | -                        if (modified)  | 
|---|
 | 7458 | +                        if (modified || opposite)  | 
|---|
| 7458 | 7459 |                          { | 
|---|
| 7459 | 7460 |                              //LA.matScale(toParent, hScale, 1, vScale); | 
|---|
| 7460 | 7461 |                              LA.matScale(toParent, 1, totalScale, 1); | 
|---|
| .. | .. | 
|---|
| 7465 | 7466 |                          break; | 
|---|
| 7466 | 7467 |   | 
|---|
| 7467 | 7468 |                      case 1: // '\003' | 
|---|
| 7468 |  | -                        if (modified)  | 
|---|
 | 7469 | +                        if (modified || opposite)  | 
|---|
| 7469 | 7470 |                          { | 
|---|
| 7470 | 7471 |                              //LA.matScale(toParent, hScale, vScale, 1); | 
|---|
| 7471 | 7472 |                              LA.matScale(toParent, 1, 1, totalScale); | 
|---|