20 |
static public class FisheyeMainNode2DFactory implements Factory { |
static public class FisheyeMainNode2DFactory implements Factory { |
21 |
public float zoom; |
public float zoom; |
22 |
public AbstractMainNode2D create(Object plane, View2D view2d, |
public AbstractMainNode2D create(Object plane, View2D view2d, |
23 |
float panx, float pany) { |
float panx, float pany) { |
24 |
return new FisheyeMainNode2D(plane, view2d, panx, pany); |
return new FisheyeMainNode2D(plane, view2d, |
25 |
|
new SimpleFocus(panx, pany)); |
26 |
} |
} |
27 |
} |
} |
28 |
|
|
31 |
/** Create a main node with a given plane, pan. |
/** Create a main node with a given plane, pan. |
32 |
*/ |
*/ |
33 |
public FisheyeMainNode2D(Object plane, View2D view2d, |
public FisheyeMainNode2D(Object plane, View2D view2d, |
34 |
float panX, float panY) { |
Focus focus) { |
35 |
super(plane, view2d, panX, panY); |
super(plane, view2d, focus); |
36 |
} |
} |
37 |
|
|
38 |
|
|
39 |
protected void setZoomPan(VobScene vs, int mainFrame) { |
protected void setZoomPan(VobScene vs, int mainFrame) { |
40 |
vs.coords.setTranslateParams(box2paper, panX, panY); |
vs.coords.setTranslateParams(box2paper, |
41 |
|
focus.getPanX(), focus.getPanY()); |
42 |
fisheyeState.setCoordsysParams(); |
fisheyeState.setCoordsysParams(); |
43 |
} |
} |
44 |
|
|
50 |
int ctr = vs.translateCS(into, "FTR", boxw/2, boxh/2); |
int ctr = vs.translateCS(into, "FTR", boxw/2, boxh/2); |
51 |
int fish = fisheyeState.getCoordsys(vs, ctr, "FISH"); |
int fish = fisheyeState.getCoordsys(vs, ctr, "FISH"); |
52 |
|
|
53 |
int translate = vs.coords.translate(0, panX, panY); |
int translate = vs.coords.translate(0, focus.getPanX(), |
54 |
|
focus.getPanY()); |
55 |
vs.matcher.add(fish, translate, "BOX2PAPER"); |
vs.matcher.add(fish, translate, "BOX2PAPER"); |
56 |
|
|
57 |
|
|