Affine transforms - matrix algebra
james.graham at oracle.com
Tue Jul 24 10:01:09 PDT 2012
On 7/24/2012 3:44 AM, Pavel Safrata wrote:
>> With respect to methods that don't take a MAT type - I think we should
>> simply say that the default is MAT_4x4 rather than infer it from the
>> size of the array - that is cleaner and avoids mistakes where they
>> forgot how big their array was (as in, they allocated a temp array and
>> left it around for future use and some other programmer came in and
>> decided that the array should be bigger without noticing that it
>> affects the values that the former code would get)...
> The MAT was introduced because there is no obvious choice of the default
> type. The 4x4 type forces you to always add four useless values to your
> array (that have no corresponding members in the class you are
> constructing). I agree that the described problem may occur. So I think
> I'd rather get rid of the simple methods completely and provide only the
> ones using MAT. We can on the other hand provide two variants, one with
> the beginIndex, second without it.
I'm OK with no default methods, but perhaps if the default were 3x4 then
there would be fewer "wasted" values? I went with 4x4 as the fullest
version, but 3x4 would be the "fullest within the sense of how many
entries FX uses".
But, either way, I'm OK with no defaults - I just didn't want the
decision to be made because of those extra 4 values alone...
More information about the openjfx-dev