30 |
* <p> |
* <p> |
31 |
* Coordinate systems are recursive; the coordinate system <code>0</code> |
* Coordinate systems are recursive; the coordinate system <code>0</code> |
32 |
* represents the root coordinate system (i.e., the whole vob scene). |
* represents the root coordinate system (i.e., the whole vob scene). |
33 |
|
* <p> |
34 |
|
* Warn about setXParams! |
35 |
*/ |
*/ |
36 |
public abstract class VobCoorder { |
public abstract class VobCoorder { |
37 |
/** Create a new coordinate system. |
/** Create a new coordinate system. |
41 |
* system into, <code>0</code> for the root |
* system into, <code>0</code> for the root |
42 |
* coordinate system. |
* coordinate system. |
43 |
*/ |
*/ |
44 |
abstract public int coordsys(int into, float depth, float x, float y, float w, float h); |
abstract public int ortho(int into, float depth, float x, float y, float w, float h); |
45 |
|
|
46 |
|
public int translate(int into, float x, float y) { |
47 |
|
return ortho(into, 0, x, y, 1, 1); |
48 |
|
} |
49 |
|
public int translate(int into, float x, float y, float z) { |
50 |
|
return ortho(into, z, x, y, 1, 1); |
51 |
|
} |
52 |
|
public int scale(int into, float sx, float sy) { |
53 |
|
return ortho(into, 0, 0, 0, sx, sy); |
54 |
|
} |
55 |
|
|
56 |
public int translateXY(int into, float x, float y) { |
abstract public void setOrthoParams(int into, float depth, float x, float y, float w, float h); |
57 |
return coordsys(into, 0, x, y, 1, 1); |
|
58 |
|
public void setTranslateParams(int into, float x, float y) { |
59 |
|
setOrthoParams(into, 0, x, y, 1, 1); |
60 |
|
} |
61 |
|
public void setTranslateParams(int into, float x, float y, float z) { |
62 |
|
setOrthoParams(into, z, x, y, 1, 1); |
63 |
|
} |
64 |
|
public void setScaleParams(int into, float sx, float sy) { |
65 |
|
setOrthoParams(into, 0, 0, 0, sx, sy); |
66 |
} |
} |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
abstract public int getCSIndexAt(float x, float y); |
abstract public int getCSIndexAt(float x, float y); |
71 |
|
|
72 |
abstract public boolean needInterp(VobCoorder interpTo, int[] interpList); |
abstract public boolean needInterp(VobCoorder interpTo, int[] interpList); |