46 |
public final gzz.client.GraphicsAPI gfxapi; |
public final gzz.client.GraphicsAPI gfxapi; |
47 |
public final gzz.client.GraphicsAPI.Window window; |
public final gzz.client.GraphicsAPI.Window window; |
48 |
|
|
49 |
|
private final AffineVobCoorder af() { |
50 |
|
if(coords instanceof AffineVobCoorder) |
51 |
|
return (AffineVobCoorder)coords; |
52 |
|
throw new gzz.errors.NotAffineVobCoorderException(); |
53 |
|
} |
54 |
|
|
55 |
public final Dimension size; |
public final Dimension size; |
56 |
public VobScene(VobMap m, VobCoorder c, VobMatcher mat, |
public VobScene(VobMap m, VobCoorder c, VobMatcher mat, |
64 |
this.window = window; |
this.window = window; |
65 |
this.size = size; |
this.size = size; |
66 |
} |
} |
67 |
|
|
68 |
|
final public int orthoCS(int into, Object key, float depth, |
69 |
|
float x, float y, float w, float h) { |
70 |
|
return matcher.addSub(into, coords.ortho(into, |
71 |
|
depth, x, y, w, h), key); |
72 |
|
} |
73 |
|
final public int translateCS(int into, Object key, float x, float y) { |
74 |
|
return matcher.addSub(into, coords.translate(into, x, y), key); |
75 |
|
} |
76 |
|
public int translateCS(int into, Object key, |
77 |
|
float x, float y, float z) { |
78 |
|
return matcher.addSub(into, coords.translate(into, x, y, z), key); |
79 |
|
} |
80 |
|
public int scaleCS(int into, Object key, float sx, float sy) { |
81 |
|
return matcher.addSub(into, coords.scale(into, sx, sy), key); |
82 |
|
} |
83 |
|
// Affine |
84 |
|
public int rotateCS(int into, Object key, float degrees) { |
85 |
|
return matcher.addSub(into, af().rotate(into, degrees), key); |
86 |
|
} |
87 |
|
public int scaleCS(int into, Object key, |
88 |
|
float sx, float sy, float sz) { |
89 |
|
return matcher.addSub(into, af().scale(into, sx, sy, sz), key); |
90 |
|
} |
91 |
|
|
92 |
/** Determines size of the area designated for the <code>Vob</code>s. |
/** Determines size of the area designated for the <code>Vob</code>s. |
93 |
* At least at the moment doesn't include margins. |
* At least at the moment doesn't include margins. |
94 |
* Coordinates of the scene's |
* Coordinates of the scene's |
104 |
put(v, null, d, x, y, w, h); |
put(v, null, d, x, y, w, h); |
105 |
} |
} |
106 |
public void put(Vob v, Object key, float d, float x, float y, float w, float h) { |
public void put(Vob v, Object key, float d, float x, float y, float w, float h) { |
107 |
int c = coords.coordsys(0, d, x, y, w, h); |
int c = coords.ortho(0, d, x, y, w, h); |
108 |
if(key != null) |
if(key != null) |
109 |
matcher.add(c, key); |
matcher.add(c, key); |
110 |
map.put(v, c); |
map.put(v, c); |
111 |
} |
} |
112 |
|
|
|
public int coordsys(int into, Object key, float d, float x, float y, float w, float h) { |
|
|
int cs = coords.coordsys(into, d, x, y, w, h); |
|
|
matcher.addSub(into, cs, key); |
|
|
return cs; |
|
|
} |
|
|
|
|
113 |
public Object getKeyAt(float x, float y, float[] targetcoords) { |
public Object getKeyAt(float x, float y, float[] targetcoords) { |
114 |
return null; |
return null; |
115 |
} |
} |