Affine transforms - matrix algebra
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Thu Jul 12 04:40:26 PDT 2012
Le 12/07/12 13:23, Pavel Safrata a écrit :
> I like the get(row, col) method, I think we can introduce it in
> addition to the array conversions. Similarly we can add set(row, col,
> value). Both just convenience methods internally calling the actual
> property getters/setters.
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.
Martin
More information about the openjfx-dev
mailing list