/[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.28 by mudyc, Fri Jun 27 14:00:34 2003 UTC revision 1.29 by mudyc, Tue Jul 1 16:33:33 2003 UTC
# Line 119  public abstract class AbstractMainNode2D Line 119  public abstract class AbstractMainNode2D
119       */       */
120      static public org.fenfire.view.lava.FenPDFContext context = null;      static public org.fenfire.view.lava.FenPDFContext context = null;
121      public void keystroke(String s) {      public void keystroke(String s) {
122          context.handleKeyStroke(s, this);          if (context != null)
123      }              context.handleKeyStroke(s, this);
   
     protected AreaSelectingView2D selection = new AreaSelectingView2D(null);  
     public void setSelection(float x, float y, float x1, float y1) {  
         selection.setArea(x,y,x1,y1);  
124      }      }
125    
126      public void renderMain(VobScene vs, int into) {      public void renderMain(VobScene vs, int into) {
127          context.mainNodeToBeRender(vs, into, this);          // inherited classes will render before this.
128          // extending classes will render after this.          if (context != null)
129                context.mainNodeToBeRender(vs, into, this);
130    
131      }      }
132      public interface Render {      public interface Render {
133          void mainNodeToBeRender(VobScene vs, int into,          void mainNodeToBeRender(VobScene vs, int into,
# Line 165  public abstract class AbstractMainNode2D Line 163  public abstract class AbstractMainNode2D
163          }          }
164      }      }
165    
166      public float[] getXYHitOnPlane(VobScene oldVobScene, float x, float y) {      public float[] getXYHit(VobScene oldVobScene, float x, float y) {
167          float[] pt = new float[] { x, y, 0 };          float[] pt = new float[] { x, y, 0 };
168          float[] sq = new float[2];          if (dbg) p("P1: "+pt[0]+" "+pt[1]+" "+pt[2]);
169          oldVobScene.coords.inverseTransformPoints3(          oldVobScene.coords.inverseTransformPoints3(box2screen, pt, pt);
170              box2screen, pt, pt);          if (dbg) p("P2: "+pt[0]+" "+pt[1]+" "+pt[2]);
171          if (this instanceof MainNode2D) {          oldVobScene.coords.transformPoints3(box2paper, pt, pt);
172                  return pt;          if (dbg) p("P3: "+pt[0]+" "+pt[1]+" "+pt[2]);
173          } else if (this instanceof FisheyeMainNode2D) {          return pt;
174              oldVobScene.coords.transformPoints3(box2paper, pt, pt);      }
             return pt;  
         } else throw new Error("No known main node view2d");  
     }  
175    
176      public boolean isHitInsidePlane(int x, int y, VobScene oldVobScene) {      public boolean isHitInsidePlane(int x, int y, VobScene oldVobScene) {
177          float[] pt = new float[] { x, y, 0 };          float[] pt = new float[] { x, y, 0 };

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

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