122 |
context.handleKeyStroke(s, this); |
context.handleKeyStroke(s, this); |
123 |
} |
} |
124 |
|
|
125 |
|
protected AreaSelectingView2D selection = new AreaSelectingView2D(null); |
126 |
|
public void setSelection(float x, float y, float x1, float y1) { |
127 |
|
selection.setArea(x,y,x1,y1); |
128 |
|
} |
129 |
|
|
130 |
public void renderMain(VobScene vs, int into) { |
public void renderMain(VobScene vs, int into) { |
131 |
context.mainNodeToBeRender(vs, into, this); |
context.mainNodeToBeRender(vs, into, this); |
132 |
// extending classes will render after this. |
// extending classes will render after this. |
165 |
} |
} |
166 |
} |
} |
167 |
|
|
168 |
|
public float[] getXYHitOnPlane(VobScene oldVobScene, float x, float y) { |
169 |
|
float[] pt = new float[] { x, y, 0 }; |
170 |
|
float[] sq = new float[2]; |
171 |
|
oldVobScene.coords.inverseTransformPoints3( |
172 |
|
box2screen, pt, pt); |
173 |
|
if (this instanceof MainNode2D) { |
174 |
|
return pt; |
175 |
|
} else if (this instanceof FisheyeMainNode2D) { |
176 |
|
oldVobScene.coords.transformPoints3(box2paper, pt, pt); |
177 |
|
return pt; |
178 |
|
} else throw new Error("No known main node view2d"); |
179 |
|
} |
180 |
|
|
181 |
public boolean isHitInsidePlane(int x, int y, VobScene oldVobScene) { |
public boolean isHitInsidePlane(int x, int y, VobScene oldVobScene) { |
182 |
float[] pt = new float[] { x, y, 0 }; |
float[] pt = new float[] { x, y, 0 }; |
183 |
float[] sq = new float[2]; |
float[] sq = new float[2]; |