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; |
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 |
|
|
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 |
|
|