/[gzz]/gzz/gzz/modules/pp/PPView2.java
ViewVC logotype

Diff of /gzz/gzz/modules/pp/PPView2.java

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

revision 1.14 by tjl, Tue Nov 5 08:55:33 2002 UTC revision 1.15 by tjl, Tue Nov 5 09:12:31 2002 UTC
# Line 220  public class PPView2 implements View { Line 220  public class PPView2 implements View {
220                  centerX(vs), buoyCenterY, buoyRadius,                  centerX(vs), buoyCenterY, buoyRadius,
221                  centerX(vs) - dir * buoyRadius, buoyCenterY);                  centerX(vs) - dir * buoyRadius, buoyCenterY);
222          }          }
223          public void buoy(int anchor, final Cell c, Cell connectedFrom) {          public void buoy(final int anchor, final Cell c, Cell connectedFrom) {
224              Object key ;              Object key ;
225              if(dir > 0)              if(dir > 0)
226                  key = new Pair(connectedFrom, c);                  key = new Pair(connectedFrom, c);
227              else              else
228                  key = new Pair(c, connectedFrom);                  key = new Pair(c, connectedFrom);
229              int actr = vs.translateCS(vs.unitSqCS(anchor, "AUSQ"), "TR12",              final int anchorUnit = vs.unitSqCS(anchor, "AUSQ");
230                              .5f, .5f);              int actr = vs.translateCS(anchorUnit, "TR12", .5f, .5f);
231              int buoycs = floater.buoyCoordsys(actr, key);              int buoycs = floater.buoyCoordsys(actr, key);
232    
233              final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0,              final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0,
# Line 244  public class PPView2 implements View { Line 244  public class PPView2 implements View {
244                  public void run() {                  public void run() {
245                      buoy_vc.setAccursed(c);                      buoy_vc.setAccursed(c);
246                      buoy_singlePlane.render(vs, frameCS, c2fCS);                      buoy_singlePlane.render(vs, frameCS, c2fCS);
247    
248                        vs.map.put(filletState);
249                        int curs = coordinatePlaneView.getCursorBox();
250                        pa("Fillet curs: "+curs);
251                        vs.map.put(fillet, anchorUnit, vs.unitSqCS(curs, "AUSQ"));
252                        vs.map.put(postFilletState);
253                  }                  }
254              });              });
255          }          }
# Line 259  public class PPView2 implements View { Line 265  public class PPView2 implements View {
265      TextStyle style = GraphicsAPI.getInstance().getTextStyle("Sans", 0, 20);      TextStyle style = GraphicsAPI.getInstance().getTextStyle("Sans", 0, 20);
266      CellInBox cellview = new ImageCell(new TextCellContentView(style));      CellInBox cellview = new ImageCell(new TextCellContentView(style));
267    
268        // public so can be replaced from jython
269        public Vob filletState = GLCache.getCallList(
270                "LineWidth 2\nColor 0 0 0\nDisable TEXTURE_2D");
271        public GLRen.SqFilletConnection fillet = GLRen.createSqFilletConnection(30,
272                1, .125f, 6);
273        public Vob postFilletState = GLCache.getCallList(
274                "LineWidth 2\nColor 0 0 0\nEnable TEXTURE_2D");
275    
276      public void render(VobScene vs, int intoCS, ViewContext context) {      public void render(VobScene vs, int intoCS, ViewContext context) {
277    
278          buoy_vc.setCellView(cellview);          buoy_vc.setCellView(cellview);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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