public final class Node
extends java.lang.Object
| Constructor and Description |
|---|
Node(java.util.List<Polygon> polygons)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Polygon> |
allPolygons()
Returns a list of all polygons in this BSP tree.
|
void |
build(java.util.List<Polygon> polygons)
Build a BSP tree out of
polygons. |
void |
build(java.util.List<Polygon> polygons,
long depth,
long maxDepth)
Build a BSP tree out of
polygons. |
void |
clipTo(Node bsp)
Removes all polygons in this BSP tree that are inside the specified BSP tree
(
bsp). |
Node |
clone() |
Plane |
getPlane() |
void |
invert()
Converts solid space to empty space and vice verca.
|
void |
setPlane(Plane plane) |
public Node(java.util.List<Polygon> polygons)
polygons - polygonspublic Node clone()
clone in class java.lang.Objectpublic void invert()
public void clipTo(Node bsp)
bsp).
Note: polygons are splitted if necessary.bsp - bsp that shall be used for clippingpublic java.util.List<Polygon> allPolygons()
public final void build(java.util.List<Polygon> polygons)
polygons. When called on an existing tree,
the new polygons are filtered down to the bottom of the tree and become new
nodes there. Each set of polygons is partitioned using the first polygon (no
heuristic is used to pick a good split).polygons - polygons used to build the BSPpublic final void build(java.util.List<Polygon> polygons, long depth, long maxDepth)
polygons. When called on an existing tree,
the new polygons are filtered down to the bottom of the tree and become new
nodes there. Each set of polygons is partitioned using the first polygon (no
heuristic is used to pick a good split).polygons - polygons used to build the BSPpublic Plane getPlane()
public void setPlane(Plane plane)