42 |
{ return (a + fract * (b-a)); } |
{ return (a + fract * (b-a)); } |
43 |
|
|
44 |
|
|
45 |
|
float[] cs1rect = new float[4]; |
46 |
|
float[] cs2rect = new float[4]; |
47 |
|
|
48 |
void setInterpInfo(int cs1, OrthoCoorder other, int cs2, |
void setInterpInfo(int cs1, OrthoCoorder other, int cs2, |
49 |
float fract, |
float fract, |
51 |
float xscale, float yscale, |
float xscale, float yscale, |
52 |
OrthoRenderInfo info |
OrthoRenderInfo info |
53 |
) { |
) { |
54 |
|
for(int i=0; i<2; i++) |
55 |
|
cs1rect[i] = cs2rect[i] = 0; |
56 |
|
for(int i=2; i<4; i++) |
57 |
|
cs1rect[i] = cs2rect[i] = 1; |
58 |
OrthoCoordsys sys1 = sys, sys2 = other.sys; |
OrthoCoordsys sys1 = sys, sys2 = other.sys; |
59 |
|
sys1.transformRect(cs1, cs1rect); |
60 |
|
sys2.transformRect(cs2, cs2rect); |
61 |
info.setCoords(sys1.depth[cs1], |
info.setCoords(sys1.depth[cs1], |
62 |
xscale * i(sys1.x[cs1], sys2.x[cs2], fract) + xoffs, |
xscale * i(cs1rect[0], cs2rect[0], fract) + xoffs, |
63 |
yscale * i(sys1.y[cs1], sys2.y[cs2], fract) + yoffs, |
yscale * i(cs1rect[1], cs2rect[1], fract) + yoffs, |
64 |
xscale * i(sys1.w[cs1], sys2.w[cs2], fract), |
xscale * i(cs1rect[2], cs2rect[2], fract), |
65 |
yscale * i(sys1.h[cs1], sys2.h[cs2], fract), |
yscale * i(cs1rect[3], cs2rect[3], fract), |
66 |
xscale * i(sys1.cx(cs1), sys2.cx(cs2), fract) + xoffs, |
0, 0, 2000, 2000); |
67 |
yscale * i(sys1.cy(cs1), sys2.cy(cs2), fract) + yoffs, |
// XXX Cliprect wrong |
|
xscale * i(sys1.cw(cs1), sys2.cw(cs2), fract), |
|
|
yscale * i(sys1.ch(cs1), sys2.ch(cs2), fract)); |
|
68 |
p("SetInterp: "+info.x+" "+info.y+" "+info.w+" "+info.h + |
p("SetInterp: "+info.x+" "+info.y+" "+info.w+" "+info.h + |
69 |
" \n\t"+xoffs+" "+yoffs+" "+xscale+" "+yscale); |
" \n\t"+xoffs+" "+yoffs+" "+xscale+" "+yscale); |
70 |
} |
} |
116 |
|
|
117 |
public void setOrthoParams(int cs, float depth, |
public void setOrthoParams(int cs, float depth, |
118 |
float x, float y, float w, float h) { |
float x, float y, float w, float h) { |
119 |
|
if(maxdepth < depth) maxdepth = depth; |
120 |
sys.setParams(cs, depth, x, y, w, h); |
sys.setParams(cs, depth, x, y, w, h); |
121 |
} |
} |
122 |
|
|