Hello.

I just submitted a PR with some large API changes in the subhyperplane classes 
and I'd like to see if anyone has any feedback. The PR is here: 
https://github.com/apache/commons-geometry/pull/75. The changes are detailed in 
the issues GEOMETRY-92 and GEOMETRY-93 but, in short, they make improvements to 
the subhyperplane and line class hierarchies. For example, here is how to 
create a 2D ray in the previous code:

    Segment ray = Segment.fromPointAndDirection(p1, dir, precision);

The class of the created object is "Segment", which clearly doesn't match the 
concept of a ray at all. Here is the new form:

    Ray ray = Ray.fromPointAndDirection(p1, dir, precision);

The created object now has a much more correct, descriptive class name. Similar 
changes are made for lines in 3D.

With the way the objects are now structured, I also noticed (via jmh gc 
profiling) a significant reduction in the memory required for subhyperplane 
operations in 2D and 3D. The 2D convex subhyperplanes no longer need references 
to 1D subspaces, considerably reducing the number of objects needed for the 
representation.

Regards,
Matt

Reply via email to