Affine transforms - matrix algebra
martin.desruisseaux at geomatys.fr
Fri Aug 17 02:14:43 PDT 2012
Le 17/08/12 17:56, Pavel Safrata a écrit :
> The methods that take arrays of doubles were requested by users for
> interoperability with other libraries (e.g. physics) which often
> support the array conversions.
Just for the record, there is an other use case in favour of arrays. I
have found the following pattern quite common:
* Get the matrix coefficients as an array.
* Update just a few coefficients in a way that can't be done easily with
the standard scale/translate methods.
* Set the matrix coefficients to the updated array.
So working with arrays avoid the need to deal with 12 coefficients when
we want to update only 1 or 2 of them and leave the other unchanged. An
other rational is that we typically get or set the coefficients using
some loops, in which case an array is more convenient than individual
More information about the openjfx-dev