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

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

{quote}I've refactored the "slerp" functionality into its own {{Slerp}} class.
{quote}
I like it! I think the performance improvement alone makes it worth it. It 
should definitely go in commons-numbers.

{quote}(e.g. to provide/use functional interfaces)
{quote}
My end goal is to have {{QuaternionRotation}} and all of the 
{{AffineTransformMatrix?D}} classes extends a greatly simplified version of the 
{{Transform}} interface (GEOMETRY-24). The interface would extend 
{{UnaryOperator}} and only have the single {{apply}} method. I know we talked 
about this previously and I didn't want to go back that road, but I think it 
will work well if we streamlined the {{Transform}} interface and have 
{{multiply}} and {{premultiply}} methods on the implementation classes to 
perform composition. That will make it abundantly clear what's going on 
mathematically and also allow users to take advantage of all the functional 
goodies from the JDK. I didn't make this change as part of this PR because of 
the sheer number of changes involved.

{quote}I've removed the redundant accessor methods
{quote}
Sounds good.

{quote}What is the purpose of {{toArray()}}?
{quote}
I thought that since I was allowing creation of instances from an array, I 
should include a way to output an array. It's not needed if we just have the 
{{of(Quaternion)}} factory method.

{quote}I think that it would make sense to have {{QuaternionRotation}} be an 
implementation of a {{Rotation3D}} interface.
{quote}
That works. I'd much rather do that than rename the class to {{Rotation3D}}. 
Here's a very simple possibility:
 
{code:java}
public interface Rotation3D extends UnaryOperator<Vector3D> { // extend 
Transform<Vector3D> after GEOMETRY-24
    Vector3D getAxis();
    double getAngle();
    Rotation3D getInverse();
}
{code}

> 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
>             Fix For: 1.0
>
>
> 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]-
> Pull Request #2: [https://github.com/apache/commons-geometry/pull/16]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to