Affine transforms - matrix algebra
Pavel Safrata
pavel.safrata at oracle.com
Tue Jul 17 03:22:55 PDT 2012
>
>> - what about getRow(row, array) and getColumn(col, array) which can
>> be combined with vector methods to do fast custom matrix operations?
> At this point, given the increasing amount of methods and the enum, I
> wonder if we should replace all those variants by a single method:
>
> double[] getSubMatrix(int firstRow, int firstColumn, int numRows, int
> numColumns, double[] array);
>
> This single method would provide the functionalities of getRow,
> getColumn, getMatrix with enum 2x3, 3x4 and 4x4 (we lost 3x3, but it
> it probably not a big deal). The enum would not be needed anymore.
>
Besides the fact that I don't really like replacing a set of
straightforward methods by a single monster, this doesn't really work
for all the cases. The 2x3 matrix for instance contains
xx xy tx
yx yy ty
which is, from the full 4x4 matrix, the first, second, and fourth column.
Regards,
Pavel
More information about the openjfx-dev
mailing list