Hi all,

I've been working on the BSP tree refactor and general API cleanup for a while 
now and I finally have the core and Euclidean classes complete. I have the code 
in a draft PR on github [1] and I'm hoping to get as much feedback on it as I 
can. Everything is in its final state from my point of view with the exception 
of the spherical module, which still needs to be switched over to the new API. 
Here are some highlights of the new code:

  *   More user-friendly API
     *   Does not require users to make unchecked casts to implementation types.
     *   BSP tree classes are much more powerful and easy to use. State is 
managed internally so that users do not need to be experts in BSP trees to 
avoid corrupting the data structures.
     *   Uses builder pattern instead of large factory methods to build 
complicated geometries.
     *   Most classes are immutable.
  *   A general-purpose AttributeBSPTree class is available so that users can 
associate arbitrary data with spatial partitionings. I'm picturing this being 
used for spatial data lookups, painter's algorithms, etc.
  *   All geometric types now support arbitrary transforms (eg, rotate, scale, 
translate, etc) via the Transform interface.
  *   The Transform interface is greatly simplified (GEOMETRY-24). It is now 
functional and simply extends java.util.Function.
  *   Better performance. My highly unsophisticated stdout benchmarking put the 
new code at about 3-4 times faster than the old when performing boolean 
operations on 3D regions.

Regards,
Matt

[1] https://github.com/apache/commons-geometry/pull/34

Reply via email to