The following updates should be made to the BSPTree class:
- add an isLeaf() method to replace all of the node.getCut() == null expressions
- add unit tests
- Refactor the API to split the idea of a general BSPTree and a BSPTree used for defining in/out regions. This could result in a BSPTree interface and a RegionBSPTree interface. The goal here is to allow end-users to create their own extensions of these classes and specialize them for their own applications (for example, to implement spatial sorting or other algorithms). This will be one of the only planned extension points in the library.
- Make the API easier to use and extend and reduce the necessity of casting (especially unchecked casting) as much as possible.
- Add the idea of convex subhyperplanes to allow for more efficient tree construction.