public final class Node extends Object
Modifier and Type | Method and Description |
---|---|
List<Polygon> |
allPolygons()
Returns with all the polygons this node holds including those which are in the front and back nodes.
|
Node |
build(List<Polygon> polygons)
Build a new node adding the given polygons - splitting the polygons if necessary.
|
List<Polygon> |
clipPolygons(List<Polygon> polys)
Recursively removes all polygons in the
polygons list that are
contained within this BSP tree. |
Node |
clipTo(Node bsp)
Remove all polygons in this BSP tree that are inside the given other BSP tree.
|
static Node |
fromPoligons(List<Polygon> polygons)
Creates a BSP node consisting of the specified polygons.
|
Node |
invert()
Inverts the node by flipping all the poligons it contains and inverting the front and
back nodes as well.
|
public static Node fromPoligons(List<Polygon> polygons)
polygons
- polygonspublic Node invert()
public List<Polygon> clipPolygons(List<Polygon> polys)
polygons
list that are
contained within this BSP tree.
Note: polygons are splitted if necessary.polys
- the polygons to clippublic Node clipTo(Node bsp)
bsp
- the tree to removepublic List<Polygon> allPolygons()
Copyright © 2014–2020, Printing in 3D. All rights reserved.