/[fenfire]/fenfire/org/fenfire/fenmm/MMGeometry.java
ViewVC logotype

Diff of /fenfire/org/fenfire/fenmm/MMGeometry.java

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

revision 1.2 by humppake, Mon Aug 25 08:40:27 2003 UTC revision 1.3 by humppake, Mon Aug 25 20:11:40 2003 UTC
# Line 4  package org.fenfire.fenmm; Line 4  package org.fenfire.fenmm;
4    
5  import org.fenfire.swamp.ConstGraph;  import org.fenfire.swamp.ConstGraph;
6  import org.fenfire.vocab.STRUCTLINK;  import org.fenfire.vocab.STRUCTLINK;
 import org.fenfire.util.Pair;  
7  import org.nongnu.libvob.VobScene;  import org.nongnu.libvob.VobScene;
8    import org.fenfire.util.Pair;
9  import java.util.Iterator;  import java.util.Iterator;
10  import java.util.List;  import java.util.List;
11  import java.util.ArrayList;  import java.util.ArrayList;
# Line 57  public class MMGeometry { Line 57  public class MMGeometry {
57    
58          double s = filletWidth * getScale(depth);          double s = filletWidth * getScale(depth);
59    
60          int cs = vs.orthoBoxCS(into, new Pair("MMPlace", node), depth,          int cs = vs.orthoBoxCS(into, new Pair("MMNode", node), depth,
61                             (float)(x - s/2f), (float)(y - s/2f),                                 (float)(x - s/2f), (float)(y - s/2f),
62                             1, 1, (float)s, (float)s);                                 1, 1, (float)s, (float)s);
63          return new MMPlace(cs, x, y);          return new MMPlace(cs, x, y);
64      }      }
65    
# Line 92  public class MMGeometry { Line 92  public class MMGeometry {
92          net.put(node, pl, 0);          net.put(node, pl, 0);
93    
94          List links = getLinkedNodes(g, node);          List links = getLinkedNodes(g, node);
95          if (links.size() < 1) net.link(node, node); // XXX probably not the right way          if (links.size() < 1) net.link(node, null);
96          else {          else {
97              curStartAngle = getStartAngle(path);              curStartAngle = getStartAngle(path);
98              // curRotationAngle = (2f*Math.PI) / links.size();              curRotationAngle = (2f*Math.PI) / links.size();
99              for (int i=2; i<maxDepth+1; i++)              for (int i=2; i<maxDepth+1; i++)
100                  buildDepth(vs, cs, net, node, null, links, 0, 0,                  buildDepth(vs, cs, net, node, null, links, 0, 0,
101                             curStartAngle + initRotation,                             curStartAngle + initRotation,
102                             curRotationAngle, 1, i);                             curRotationAngle, 1, i);
103          }          }
104          // curCenter = node;          curCenter = node;
105          return net;          return net;
106      }      }
107    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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