.. | .. |
---|
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 | } |
---|