/[fenfire]/fenfire/org/fenfire/view/SpatialPlane.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/SpatialPlane.java

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

revision 1.26 by tjl, Fri Apr 25 11:19:39 2003 UTC revision 1.27 by mudyc, Mon Apr 28 11:17:16 2003 UTC
# Line 44  public static final String rcsid = "$Id$ Line 44  public static final String rcsid = "$Id$
44      public int getCursorBox() { return cursorBox; }      public int getCursorBox() { return cursorBox; }
45    
46    
47      public void renderAWT(VobScene vs, int into, int geom,      /** Render spatial plane with culling.
                           Object node, NodeView nodeview,  
                           Fen fen, NodePlacementHook hook)  
     {  
         if(dbg) pa("RenderAwt");  
         Object current = node;  
         Object container = current;  
   
         if (RDFUtil.isNodeType(fen, current, cType)) {  
             container = fen.constgraph.find1_X11(cont, current);  
         }  
   
           
   
         // get zoom geometry etc.  
         float[] size = new float[2];  
         vs.coords.getSqSize(into, size);  
         float[] pt = vs.coords.transformPoints3(into, new float[3], null);  
         pt[0] += size[0]/2;  
         pt[1] += size[1]/2;  
         if (size[0] < 10 || size[1] <10) return;  
   
           
         float[] pan = new float[]{1,1};  
         vs.coords.getSqSize(geom, pan);  
         float zoom = (vs.coords.transformPoints3(geom, new float[3], null))[0]/100000;  
   
         float[] bs = new float[2];  
         cursorBox = -1;  
           
         Iterator iter = fen.constgraph.findN_11X_Iter(container, cont);  
         while (iter.hasNext()) {  
             Object n = iter.next();  
   
             // get coords  
             int[] coords = new int[2];  
             coords[0] = RDFUtil.getInt(fen, n, SPATIAL.coordX);  
             coords[1] = RDFUtil.getInt(fen, n, SPATIAL.coordY);  
   
             nodeview.getSize(n, bs, zoom);  
             Pair matchKey = new Pair(container, n);  
             int box = vs.orthoCS(0, matchKey, pt[2]-.5f,  
                                  pt[0] + (pan[0] - coords[0])*zoom - bs[0],  
                                  pt[1] + (pan[1] - coords[1])*zoom - bs[1],  
                                  bs[0], bs[1]);  
             nodeview.place(n, vs, box);  
               
             if (hook != null) hook.placed(n, vs, box);  
   
             // XXX?  
             //vs.activate(box);  
   
             if(current.equals(n))  
                 cursorBox = box;  
   
             if(dbg) pa("Placing: "+n+" "+coords[0]+" "+coords[1]);  
         }  
     }  
   
   
   
   
     /** Render with culling.  
48       * @param cullCS is the clip cs or under zero if not used.       * @param cullCS is the clip cs or under zero if not used.
49       */       */
50      public void renderGL(VobScene vs, int into,      public void render(VobScene vs, int into,
51                         Object node, int cullCS,                         Object node, int cullCS,
52                         Fen fen, NodePlacementHook hook, NodeView nodeview)                         Fen fen, NodePlacementHook hook,
53                           NodeView nodeview)
54      {      {
55          if(dbg) pa("render GL, node: "+ node);          if(dbg) pa("render GL, node: "+ node);
56    
# Line 145  public static final String rcsid = "$Id$ Line 84  public static final String rcsid = "$Id$
84              if (hook != null) hook.placed(n, vs, box);              if (hook != null) hook.placed(n, vs, box);
85    
86              // XXX?              // XXX?
87              //vs.activate(box);              vs.activate(box);
88    
89              if(current.equals(n))              if(current.equals(n))
90                  cursorBox = box;                  cursorBox = box;

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

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