Affine transforms - matrix algebra

Pavel Safrata pavel.safrata at oracle.com
Thu Jul 12 04:47:26 PDT 2012


On 12.7.2012 13:40, Martin Desruisseaux wrote:
> 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.

I completely agree.
Thanks,
Pavel

>
>     Martin
>




More information about the openjfx-dev mailing list