7 |
|
|
8 |
/** View2D to draw the selecting area |
/** View2D to draw the selecting area |
9 |
*/ |
*/ |
10 |
public class AreaSelectingView2D extends View2D { |
public class AreaSelectingView2D extends View2D implements FastView { |
11 |
public static boolean dbg = false; |
public static boolean dbg = false; |
12 |
private static void pa(String s) { System.out.println("AreaSelectingView2D:: "+s); } |
private static void p(String s) { System.out.println("AreaSelectingView2D:: "+s); } |
13 |
|
|
14 |
public View2D getChildView2D() { return child; } |
public View2D getChildView2D() { return child; } |
15 |
protected View2D child; |
protected View2D child; |
41 |
pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10); |
pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10); |
42 |
} |
} |
43 |
|
|
44 |
|
int cs = -1; |
45 |
|
|
46 |
public void render(VobScene vs, Object plane, |
public void render(VobScene vs, Object plane, |
47 |
int matchingParent, |
int matchingParent, |
48 |
int box2screen, int box2paper) { |
int box2screen, int box2paper) { |
56 |
int paper2box = vs.invertCS(box2paper, "areaselectview_INv"); |
int paper2box = vs.invertCS(box2paper, "areaselectview_INv"); |
57 |
int paper2screen = vs.concatCS(box2screen, "areaselectview_conc", |
int paper2screen = vs.concatCS(box2screen, "areaselectview_conc", |
58 |
paper2box); |
paper2box); |
59 |
int cs = vs.orthoCS(paper2screen, "selection", 0, x0,y0,x1-x0,y1-y0); |
cs = vs.orthoCS(paper2screen, "selection", 0, 1,2,3,4); |
60 |
|
chgFast(vs); |
61 |
vs.put(pq, cs); |
vs.put(pq, cs); |
62 |
|
|
63 |
} |
} |
64 |
|
|
65 |
|
public void chgFast(VobScene oldVS) { |
66 |
|
oldVS.coords.setOrthoParams(cs, 0, x0,y0,x1-x0,y1-y0); |
67 |
|
} |
68 |
|
|
69 |
|
|
70 |
public void getSize(Object plane, float[] wh) { |
public void getSize(Object plane, float[] wh) { |