(int dimensions)
| 1476 | |
| 1477 | |
| 1478 | @Override |
| 1479 | protected void checkMatrix(int dimensions) { |
| 1480 | if (matrix == null) { |
| 1481 | if (dimensions == 2) { |
| 1482 | matrix = new PMatrix2D(); |
| 1483 | matrixInv = new PMatrix2D(); |
| 1484 | } else { |
| 1485 | matrix = new PMatrix3D(); |
| 1486 | matrixInv = new PMatrix3D(); |
| 1487 | } |
| 1488 | } else if (dimensions == 3 && (matrix instanceof PMatrix2D)) { |
| 1489 | matrix = new PMatrix3D(matrix); |
| 1490 | matrixInv = new PMatrix3D(matrixInv); |
| 1491 | } |
| 1492 | } |
| 1493 | |
| 1494 | |
| 1495 | /////////////////////////////////////////////////////////// |