Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
The current Point/Vector API requires a lot of casting internally and will be difficult to extend since it makes numerous assumptions about the objects passed into methods via the interfaces. For example, o.a.c.geometry.euclidean.threed.Line#toSubspace(Vector<Euclidean3D>) immediately casts its argument to Point<Euclidean3D>, assuming that the concrete class implements both, although nothing in the interfaces requires this.
I think this API needs to be refactored to remove these issues. Here are my main goals for this task:
- Remove the need to cast to concrete classes in implementations.
- Allow for easy extension in the future. One specific extension I want to allow is the addition of extra coordinate systems, for example, polar coordinates in Euclidean2D.
- Use obvious names for mathematical objects. We should have PointXD and VectorXD classes instead of CartesianXD.
Pull request: https://github.com/apache/commons-geometry/pull/2
Attachments
Attachments
Issue Links
- links to