Transform point using localToSceneTransform
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Mon Jul 23 07:44:24 PDT 2012
Hello Pedro
Le 23/07/12 16:30, Pedro Duque Vieira a écrit :
> 2- I don't like the append, prepend naming for the following reason: are
> you adding or subtracting or multiplying,.. matrixs? I suggest "multiply"
> as the name of the method.
They are matrix multiplications, but except in the case of
"Affine.append/prepend(Affine)" the matrix is implicit. For example
"appendTranslation" implicitly built a translation matrix to be
multiplied with the current Affine instance.
They are multiplication in both cases. The problem is to express
whatever we are doing AxB or BxA.
> 3- public double determinant()
> Calculates and returns the determinant of this transform
I think this method is already presents in Affine. Do you propose it
provides it in the Transform parent class?
> 4- public boolean equals(Transform t)
Right. But is overriding equals(Object) sufficient?
> 5- invert()
> Inverts this transform in place
Like 'determinant()', do you propose to move this method from Affine to
the Transform parent class?
> 6- multiply(double scalar)
> Multiplies each element of this transform by a scalar.
>
> 7- subtract(Transform t)
> substracts this matrix with matrix t
>
> 8- add(Transform t)
> adds this matrix with matrix t
>
> 9- transpose()
> Transposes this matrix
A problem is that those operations can not be implemented in the Affine
class with the usual Matrix semantic, since they would change the '1'
value in the last column of the last row into something else...
Furthermore I wonder what they geometrically means? (e.g. the
'transpose' operation would move the 'scaleX' value to the 'translateX'
position, etc.).
Thanks for your feedbacks,
Martin
More information about the openjfx-dev
mailing list