40 |
public static boolean dbg = true; |
public static boolean dbg = true; |
41 |
private static void p(String s) { System.out.println("MainNode2D:: "+s); } |
private static void p(String s) { System.out.println("MainNode2D:: "+s); } |
42 |
|
|
|
protected float zoom; |
|
|
|
|
43 |
private float tmp[] = new float[2]; |
private float tmp[] = new float[2]; |
44 |
|
|
45 |
static public class MainNode2DFactory implements Factory { |
static public class MainNode2DFactory implements Factory { |
65 |
ControlBinding controller) { |
ControlBinding controller) { |
66 |
super(plane, view2d, focus, controller); |
super(plane, view2d, focus, controller); |
67 |
focus.setZoom(zoom); |
focus.setZoom(zoom); |
|
this.zoom = zoom; |
|
68 |
} |
} |
69 |
|
|
70 |
/** Create a main node focused the center of a given plane. |
/** Create a main node focused the center of a given plane. |
94 |
} |
} |
95 |
|
|
96 |
protected void setZoomPan(VobScene vs, int mainFrame) { |
protected void setZoomPan(VobScene vs, int mainFrame) { |
97 |
|
float zoom = focus.getZoom(); |
98 |
vs.coords.setOrthoBoxParams(box2paper, 0, |
vs.coords.setOrthoBoxParams(box2paper, 0, |
99 |
focus.getPanX()-boxw/zoom/2, focus.getPanY()-boxh/zoom/2, |
focus.getPanX()-boxw/zoom/2, focus.getPanY()-boxh/zoom/2, |
100 |
1/zoom, 1/zoom, boxw, boxh); |
1/zoom, 1/zoom, boxw, boxh); |