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

Matt Juntunen commented on GEOMETRY-14:
---------------------------------------

{quote}Using it will bring all the advantages of a standard API.
{quote}
I agree with using the standard API here. However, there are a couple of slight 
issues.
 # The transform classes are used to transform both points and vectors, but we 
can only choose one to be the type for UnaryOperator. It should probably be 
points, but it seems weird to leave vectors out like that.
 # The {{andThen}} and {{compose}} methods from {{java.util.Function}} don't 
really provide the behavior we want when chaining transforms. The JDK versions 
return new functions that invoke the original ones in the correct order. What 
we want in our method is to multiply the transform matrices together to create 
a new matrix that mathematically performs the same operations as if the 
original matrices were applied in order. So, the end result is the same but the 
internals (and performance) are quite different. I think we need a separate 
method name to convey this concept. I previously proposed {{transform}} but 
some other options might be {{build}}, {{combine}}, ...

{quote}Maybe, but caution still applies for anything that goes into the public 
API. The fluent API is nice but we should explore the alternatives.
{quote}
Yes. I do quite like it, though, and I think it will get some good use. Did you 
have any other alternatives in mind?
{quote}This is a can of worms, as it will prevent any simple implementation of 
multi-threaded processing.
{quote}
I've refactored this in my working branch so that the classes are truly 
immutable, ie all fields are final.

> 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)

Reply via email to