com.brackeen.javagamebook.bsp2D
Class BSPTreeBuilder

java.lang.Object
  extended bycom.brackeen.javagamebook.bsp2D.BSPTreeBuilder
Direct Known Subclasses:
BSPTreeBuilderWithPortals

public class BSPTreeBuilder
extends java.lang.Object

The BSPTreeBuilder class builds a BSP tree from a list of polygons. The polygons must be BSPPolygons. Currently, the builder does not try to optimize the order of the partitions, and could be optimized by choosing partitions in an order that minimizes polygon splits and provides a more balanced, complete tree.


Constructor Summary
BSPTreeBuilder()
           
 
Method Summary
 BSPTree build(java.util.List polygons)
          Builds a BSP tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BSPTreeBuilder

public BSPTreeBuilder()
Method Detail

build

public BSPTree build(java.util.List polygons)
Builds a BSP tree.