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

Matt Juntunen commented on GEOMETRY-144:
----------------------------------------

I still believe we should just go with one algorithm and hide all of the 
details of the computation. The majority of users will not have any preference 
as to which algorithm is used as long as the implementation is accurate and 
fast.

{quote}Is there really a need for a {{ConvexHull}} interface as there is right 
now in the hull module? As I see it, the interface offers little additional 
functionality compared to the {{ConvexArea}} and {{ConvexVolume}} class (keeps 
only track of the vertices in three dimensions). 
{quote}

I do see utility in having the additional interface, even though it is similar 
to {{ConvexVolume}}. The main reasons are
1. it provides direct access to the vertices on the hull, and
2. it supports hulls of zero size, i.e., with all points lying entirely on a 
single plane, line, or point.

{{ConvexVolume}} does provide access to vertices but only by iterating through 
each face. If you wanted to filter a cloud of points to only those points on 
the convex hull using {{ConvexVolume}}, you would have to construct the hull 
and then iterate through each face, collecting the vertices and removing 
duplicates. This seems unnecessary since the list of used vertices is directly 
available from the hull generation. Also, a convex hull does not need to have a 
3 dimensional size, which is a requirement of {{ConvexVolume}}. Attempting to 
construct a {{ConvexVolume}} of zero size results in an exception.

> Review API in "hull" module
> ---------------------------
>
>                 Key: GEOMETRY-144
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-144
>             Project: Commons Geometry
>          Issue Type: Task
>            Reporter: Gilles Sadowski
>            Assignee: Gilles Sadowski
>            Priority: Minor
>             Fix For: 1.1
>
>
> Review codes in the 
> [{{commons-geometry-hull}}|https://gitbox.apache.org/repos/asf?p=commons-geometry.git;a=tree;f=commons-geometry-hull;hb=HEAD]
>  module.
> (x) Minimize the public API



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to