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

Matt Juntunen commented on GEOMETRY-94:
---------------------------------------

[~erans], I just had a thought that might help users navigate the API without 
the need to put everything in a single namespace class: what if we created a 
single convenience class per "primary" object (eg, line, plane, etc), that 
contained aliases for all of the factory methods for creating subsets of that 
type? We would have, for example, a {{LineSubsets}} class with methods 
{{rayFromPointAndDirection()}} and {{segmentFromPoints()}}. Usage would then 
look like this:

{code:java}
Line line = Line.fromPoints(a, b, precision); // still uses primary hyperplane 
class for instantiation
Ray ray = LineSubsets.rayFromPointAndDirection(pt, dir, precision);
Segment seg = LineSubsets.segmentFromPoints(p0, p1, precision);
{code}

We would have {{LineSubsets3D}} and {{PlaneSubsets}} in Euclidean 3D.

WDYT?
 

> ConvexSubPlane Subclasses
> -------------------------
>
>                 Key: GEOMETRY-94
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-94
>             Project: Apache Commons Geometry
>          Issue Type: New Feature
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: beta1
>
> There should be specific subclasses of {{ConvexSubPlane}} to allow for 
> optimization and ease of use.
>  - {{OpenConvexSubPlane}} - extends {{ConvexSubPlane}}; represents a convex 
> subplane that is open on a least one side and has infinite size
>  - {{ClosedConvexSubPlane}} - extends {{ConvexSubPlane}}; represents a convex 
> subplane with finite size; the 2D subspace is a polygon
>  - {{Triangle3D}} - extends {{ClosedConvexSubPlane}}; represents a triangle 
> in 3D space; most 3D models are or can easily be represented with triangles 
> so it would be good to have a dedicated class for this.



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

Reply via email to