.. | .. |
---|
160 | 160 | |
---|
161 | 161 | static cVector xformDir(cVector v, double mat[][]) |
---|
162 | 162 | { |
---|
| 163 | + new Exception().printStackTrace(); |
---|
163 | 164 | System.exit(0); |
---|
164 | 165 | cVector temp = new cVector(); |
---|
165 | 166 | xformDir(v, mat, temp); |
---|
.. | .. |
---|
306 | 307 | |
---|
307 | 308 | } |
---|
308 | 309 | |
---|
309 | | - GrafreeD.Assert(Math.abs(src[0][3]) <= 1E-15); |
---|
310 | | - GrafreeD.Assert(Math.abs(src[1][3]) <= 1E-15); |
---|
311 | | - GrafreeD.Assert(Math.abs(src[2][3]) <= 1E-15); |
---|
312 | | - GrafreeD.Assert(Math.abs(src[3][3] - 1) <= 1E-15); |
---|
313 | | - GrafreeD.Assert(Math.abs(dst[0][3]) <= 1E-15); |
---|
314 | | - GrafreeD.Assert(Math.abs(dst[1][3]) <= 1E-15); |
---|
315 | | - GrafreeD.Assert(Math.abs(dst[2][3]) <= 1E-15); |
---|
316 | | - GrafreeD.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); |
---|
| 310 | + // Last row should always be 0 0 0 1 |
---|
| 311 | + Grafreed.Assert(Math.abs(src[0][3]) <= 1E-15); |
---|
| 312 | + Grafreed.Assert(Math.abs(src[1][3]) <= 1E-15); |
---|
| 313 | + Grafreed.Assert(Math.abs(src[2][3]) <= 1E-15); |
---|
| 314 | + Grafreed.Assert(Math.abs(src[3][3] - 1) <= 1E-15); |
---|
| 315 | + Grafreed.Assert(Math.abs(dst[0][3]) <= 1E-15); |
---|
| 316 | + Grafreed.Assert(Math.abs(dst[1][3]) <= 1E-15); |
---|
| 317 | + Grafreed.Assert(Math.abs(dst[2][3]) <= 1E-15); |
---|
| 318 | + Grafreed.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); |
---|
317 | 319 | } |
---|
318 | 320 | |
---|
319 | 321 | static double toRadians(double degrees) |
---|
.. | .. |
---|
623 | 625 | private static int indxr[] = new int[4]; |
---|
624 | 626 | private static int indxc[] = new int[4]; |
---|
625 | 627 | |
---|
| 628 | + static double[][] Identity = new double[4][4]; |
---|
626 | 629 | |
---|
627 | 630 | static int SIZE = 0; // 65536*64; |
---|
628 | 631 | |
---|
.. | .. |
---|
638 | 641 | costable[i] = Math.cos(PI2 * i/SIZE); |
---|
639 | 642 | sintable[i] = Math.sin(PI2 * i*i/SIZE/SIZE); |
---|
640 | 643 | } |
---|
| 644 | + |
---|
| 645 | + LA.matIdentity(Identity); |
---|
641 | 646 | } |
---|
642 | 647 | |
---|
643 | 648 | static double cos(double x0) |
---|