.. | .. |
---|
3 | 3 | // Decompiler options: packimports(3) |
---|
4 | 4 | // Source File Name: Camera.java |
---|
5 | 5 | |
---|
6 | | - |
---|
7 | 6 | class Camera extends Object3D |
---|
8 | 7 | { |
---|
9 | 8 | static final long serialVersionUID = 4754289789178680517L; |
---|
.. | .. |
---|
21 | 20 | //<-2.2,0.7,-2> and pointed it at <-0.61,0.3,-0.6> |
---|
22 | 21 | // location = LA.newVector(2,0.7,-2); |
---|
23 | 22 | // lookAt = new cVector(0.6,0.3,-0.6); |
---|
24 | | - location = LA.newVector(3,2,2); |
---|
| 23 | + location = LA.newVector(6,2,4); |
---|
25 | 24 | lookAt = new cVector(0.0,0.5,0); |
---|
26 | 25 | direction = new cVector(); |
---|
27 | 26 | toParent = LA.newMatrix(); |
---|
.. | .. |
---|
53 | 52 | perspective = true; |
---|
54 | 53 | break; |
---|
55 | 54 | case 1: // '\001' |
---|
56 | | - location = LA.newVector(0, 0, 4); |
---|
| 55 | + location = LA.newVector(4, 0, 0); |
---|
57 | 56 | perspective = false; |
---|
58 | 57 | break; |
---|
59 | 58 | case 2: // '\002' |
---|
.. | .. |
---|
64 | 63 | //LA.matXRotate(fromScreen, LA.toRadians(90)); |
---|
65 | 64 | break; |
---|
66 | 65 | case 3: // '\003' |
---|
67 | | - location = LA.newVector(4, 0, 0); |
---|
| 66 | + location = LA.newVector(0, 0, 4); |
---|
68 | 67 | //LA.matZRotate(toScreen, LA.toRadians(-90)); |
---|
69 | 68 | //LA.matXRotate(toScreen, LA.toRadians(-90)); |
---|
70 | 69 | //LA.matXRotate(fromScreen, LA.toRadians(90)); |
---|
.. | .. |
---|
72 | 71 | perspective = false; |
---|
73 | 72 | break; |
---|
74 | 73 | case 4: // Default light |
---|
75 | | - location = LA.newVector(10, 30, 20); |
---|
| 74 | + location = LA.newVector(-5, 15, 10); |
---|
76 | 75 | perspective = false; |
---|
77 | 76 | break; |
---|
78 | 77 | } |
---|
.. | .. |
---|
105 | 104 | focalLength = 1; |
---|
106 | 105 | setAspect(4, 3); |
---|
107 | 106 | background = LA.newVector(0.8, 0.8, 0.8); |
---|
| 107 | + } |
---|
| 108 | + |
---|
| 109 | + void CreateMaterial(boolean multiply) |
---|
| 110 | + { |
---|
| 111 | + super.CreateMaterial(multiply); |
---|
| 112 | + |
---|
| 113 | + material.shift = 90; |
---|
| 114 | + material.cameralight = 0.2f; |
---|
| 115 | + material.shadowbias = 10; |
---|
108 | 116 | } |
---|
109 | 117 | |
---|
110 | 118 | void setAspect(int width, int height) |
---|
.. | .. |
---|
320 | 328 | location.set(lookAt); |
---|
321 | 329 | lookAt.set(cStatic.point1); |
---|
322 | 330 | |
---|
323 | | - computeTransform(); |
---|
| 331 | + //computeTransform(); |
---|
324 | 332 | } |
---|
325 | 333 | |
---|
326 | 334 | //synchronized // june 2014 |
---|
.. | .. |
---|
392 | 400 | if (CameraPane.ROTATECAMERA) |
---|
393 | 401 | { |
---|
394 | 402 | double[][] rotate = { { 0,1,0,0 }, { -1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; |
---|
395 | | - double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; |
---|
| 403 | + //double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; |
---|
396 | 404 | |
---|
397 | | - LA.matConcat(rotate, fromScreen, fromScreen); |
---|
398 | | - LA.matConcat(toScreen, rotate_1, toScreen); |
---|
| 405 | + LA.matConcat(fromScreen, rotate, fromScreen); |
---|
| 406 | + //LA.matConcat(toScreen, rotate_1, toScreen); |
---|
399 | 407 | } |
---|
400 | 408 | //if (this == CameraPane.lightCamera) |
---|
401 | 409 | //CameraPane.lighttouched = true; |
---|
| 410 | + |
---|
| 411 | + LA.matInvert(fromScreen, toScreen); |
---|
402 | 412 | } |
---|
403 | 413 | |
---|
404 | 414 | // void Draw(CameraPane display, Object3D /*Composite*/ root, boolean selected) |
---|