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

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

{quote}Really? This is actually a question: I don't know why it is a 
requirement (nor where it is defined).
{quote}
I picture a region as a connected subset of the points in a space (see 
[here|http://example.com/]). Therefore, the transformed region should be the 
same as applying the transform to all of the points in that subset. I don't 
have a formal proof of that statement, but I believe it holds nonetheless. The 
flipping of the inside and outside of the regions we're talking about here is 
simply a by-product of the fact that we're using oriented hyperplanes to test 
points for inclusion in the region. For example, if we had a triangle in 2D and 
defined our region using 3 points and barycentric coordinates instead of 
oriented hyperplanes, then there would be no flipping of the inside and outside 
of the region when transformed by a reflection. The same would be true if we 
used unoriented line segments and winding numbers. The requirement to flip the 
inside and outside of our oriented-hyperplane-bounded regions in certain 
situations is just a requirement of how we're implementing the region inclusion 
test, and not a property of the region itself.

> BSPTree Updates
> ---------------
>
>                 Key: GEOMETRY-32
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-32
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>          Components: core
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  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
> _Edit [2019-02-17]:_
> Additional goals:
> - 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to