[ 
https://issues.apache.org/jira/browse/GEOMETRY-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769295#comment-16769295
 ] 

Matt Juntunen commented on GEOMETRY-32:
---------------------------------------

Cool, thanks. As grimreaper pointed out on github, it would be good to have a 
unit test for it. Unfortunately, this is the first that {{BSPTree}} has really 
been touched in this refactor so there aren't any existing tests:-(

Also, I've been thinking about the whole design for this class and considering 
refactoring it into {{BSPTree}} and {{BSPTreeNode}} interfaces. We would then 
have a "standard" BSP tree implementation class and one designed specifically 
for working with regions. That way, users can use BSPs for other purposes. To 
help with this, I'm picturing a structure similar to the DOM interface, where 
users do not create nodes directly but rather through the root document element 
(eg, document.createElement()) , which owns all of the nodes. This is a really 
powerful data structure and I'd like to make it less painful to use. I'll post 
more specifics after I finish up with the hyperplane updates (eg, GEOMETRY-28 
and GEOMETRY-29).

> BSPTree Updates
> ---------------
>
>                 Key: GEOMETRY-32
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-32
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to