Normand Briere
2019-06-17 13e9febe94aaeebad9c97f6d3e2aa4d73b2495c8
CameraPane.java
....@@ -1890,7 +1890,7 @@
18901890 void PushMatrix(double[][] matrix)
18911891 {
18921892 // GrafreeD.tracein(matrix);
1893
- PushMatrix(matrix,1);
1893
+ PushMatrix(matrix, 1);
18941894 }
18951895
18961896 void PushMatrix()
....@@ -9335,7 +9335,7 @@
93359335
93369336 if (renderCamera != lightCamera)
93379337 //for (int count = parentcam.GetTransformCount(); --count>=0;)
9338
- LA.matConcat(matrix, parentcam.GlobalTransformInv(), matrix);
9338
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
93399339
93409340 // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix);
93419341
....@@ -9351,7 +9351,7 @@
93519351
93529352 if (renderCamera != lightCamera)
93539353 //for (int count = parentcam.GetTransformCount(); --count>=0;)
9354
- LA.matConcat(parentcam.GlobalTransform(), matrix, matrix);
9354
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
93559355
93569356 // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix);
93579357
....@@ -10550,7 +10550,7 @@
1055010550 // if (parentcam != renderCamera) // not a light
1055110551 if (cam != lightCamera)
1055210552 //for (int count = parentcam.GetTransformCount(); --count>=0;)
10553
- LA.matConcat(matrix, parentcam.GlobalTransformInv(), matrix);
10553
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
1055410554
1055510555 for (int j = 0; j < 4; j++)
1055610556 {
....@@ -10565,7 +10565,7 @@
1056510565 // if (parentcam != renderCamera) // not a light
1056610566 if (cam != lightCamera)
1056710567 //for (int count = parentcam.GetTransformCount(); --count>=0;)
10568
- LA.matConcat(parentcam.GlobalTransform(), matrix, matrix);
10568
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
1056910569
1057010570 //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix);
1057110571
....@@ -10959,7 +10959,7 @@
1095910959
1096010960 // if (cam != lightCamera)
1096110961 //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
1096310963 }
1096410964
1096510965 LA.xformDir(lightposition, cam.toScreen, lightposition);
....@@ -10981,7 +10981,7 @@
1098110981 {
1098210982 if (cam != lightCamera)
1098310983 //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
1098510985 }
1098610986
1098710987 LA.xformPos(light0, cam.toScreen, light0);
....@@ -11894,7 +11894,7 @@
1189411894 for (int i = tp.size(); --i >= 0;)
1189511895 {
1189611896 //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);
1189811898 }
1189911899
1190011900
....@@ -11912,7 +11912,7 @@
1191211912 }
1191311913
1191411914 //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
1191611916
1191711917 LA.xformPos(light, renderCamera.toScreen, light);
1191811918
....@@ -13833,6 +13833,8 @@
1383313833
1383413834 public void mouseDragged(MouseEvent e)
1383513835 {
13836
+ Globals.MOUSEDRAGGED = true;
13837
+
1383613838 //System.out.println("mouseDragged: " + e);
1383713839 if (isRenderer)
1383813840 movingcamera = true;
....@@ -14398,6 +14400,8 @@
1439814400
1439914401 public void mouseReleased(MouseEvent e)
1440014402 {
14403
+ Globals.MOUSEDRAGGED = false;
14404
+
1440114405 movingcamera = false;
1440214406 X = Y = 0;
1440314407 //System.out.println("mouseReleased: " + e);
....@@ -15513,12 +15517,17 @@
1551315517 {
1551415518 switch (object.selection.get(0).hitSomething)
1551515519 {
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;
1551915529 }
1552015530
15521
- gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
1552215531 }
1552315532 }
1552415533 }