/[fenfire]/fenfire/org/fenfire/view/buoy/AbstractMainNode2D.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/buoy/AbstractMainNode2D.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by mudyc, Thu Jun 26 00:29:25 2003 UTC revision 1.28 by mudyc, Fri Jun 27 14:00:34 2003 UTC
# Line 122  public abstract class AbstractMainNode2D Line 122  public abstract class AbstractMainNode2D
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.
# Line 160  public abstract class AbstractMainNode2D Line 165  public abstract class AbstractMainNode2D
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];

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26