|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.geometry.polygons.treeList
class treeList
tree - class to hold lists to build a containment tree (that is a representation of which polygon is inside which, like a Venn diagram).
Field Summary | |
---|---|
private boolean |
beingDestroyed
Flag to prevent cyclic graphs going round forever |
private java.util.List<treeList> |
children
The polygons inside this one |
private int |
index
Index of this polygon in the list |
private treeList |
parent
The polygon that contains this one |
Constructor Summary | |
---|---|
treeList(int i)
Constructor builds from a polygon index |
Method Summary | |
---|---|
void |
addChild(treeList t)
Add a polygon as a child of this one |
RrCSG |
buildCSG(java.util.List<RrCSG> csgPols)
Walk the tree building a CSG expression to represent all the polygons as one thing. |
void |
destroy()
Destroy me and all that I point to |
treeList |
getChild(int i)
Get the ith polygon child of this one |
treeList |
getParent()
Get the parent |
int |
polygonIndex()
get the index of the polygon |
void |
remove(treeList t)
Remove every instance of polygon t from the list |
void |
setParents()
Do a depth-first walk setting parents. |
int |
size()
How long is the list (if any) |
java.lang.String |
toString()
Printable form |
treeList |
walkFind(int target)
Recursively walk the tree from here to find polygon target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int index
private java.util.List<treeList> children
private treeList parent
private boolean beingDestroyed
Constructor Detail |
---|
public treeList(int i)
i
- Method Detail |
---|
public void destroy()
public void addChild(treeList t)
t
- public treeList getChild(int i)
i
-
public treeList getParent()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public void remove(treeList t)
t
- public treeList walkFind(int target)
node
- target
-
public RrCSG buildCSG(java.util.List<RrCSG> csgPols)
csgPols
-
public void setParents()
node
- public int polygonIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |