Affine transforms - matrix algebra
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Thu Jul 12 04:46:55 PDT 2012
Le 12/07/12 13:40, Martin Desruisseaux a écrit :
> Yes, I think those methods would be useful. Would it be worth to make
> a special case in the getter method like below?
>
> if (row == 3) {
> return (column == 3) ? 1 : 0;
> }
>
> The setter method would throw an exception on attempt to write a
> different value in that row (i.e., the last matrix row would be a
> virtual read-only row). The intend is to simulate a complete 4x4
> matrix, which can make mathematical operations more natural,
> especially when working on arbitrary row/column indices unknown at
> compile time.
Actually such getter method could be placed in the parent Transform
class, since every subclasses can return appropriate hard-coded values
for any (row,column) indices not associated to one of their fields
(omitting the [0 ... 3] range check in this discussion for simplicity).
This would allow the users to perform their own matrix calculation on
every kind of Transform object.
Martin
More information about the openjfx-dev
mailing list