[
https://issues.apache.org/jira/browse/GEOMETRY-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640689#comment-16640689
]
Gilles commented on GEOMETRY-14:
--------------------------------
{quote}the API would be a bit more awkward, assuming that by A.compose(B) we
mean "perform B then perform A"
{quote}
It's not what I'd assume; so I see the possible confusion. ;)
Couldn't we leverage the [JDK
API|https://docs.oracle.com/javase/8/docs/api/java/util/function/UnaryOperator.html]?
I.e. have something like
{code:java}
public class AffineTransform3D implements UnaryOperator<P extends Point3D>
{code}
{quote}{{transform.applyTo(vec)}} [because] they are applied _to_ points and
vectors.
{quote}
Yes, but {{apply(vec)}} is as clear and more concise, and now favored by the
JDK.
{quote}The vector and point classes have corresponding {{vec.apply(transform)}}
{quote}
Usual question: Why adding to the API?
Furthermore, this one is fairly counter-intuitive: to be consistent it should
have been {{vec.isAppliedToBy(transform)}}.
{quote}translate is an instance method and applies a translation to the current
transform.
{quote}
Does that mean that the class is mutable? :(
> AffineTransform?D Classes
> -------------------------
>
> Key: GEOMETRY-14
> URL: https://issues.apache.org/jira/browse/GEOMETRY-14
> Project: Apache Commons Geometry
> Issue Type: New Feature
> Reporter: Matt Juntunen
> Priority: Major
> Labels: pull-request-available
>
> We should create AffineTransform?D classes that implement matrix-based affine
> transforms. They should have simple methods for creating translations,
> rotations, and scaling and calculating the inverse.
>
> Pull Request #1: https://github.com/apache/commons-geometry/pull/14
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)