Affine transforms - matrix algebra
Kirill Prazdnikov
Kirill.Prazdnikov at oracle.com
Thu Jul 12 06:00:02 PDT 2012
Hi Martin,
I perfectly understand the value of indexed access.
And I agree with you.
Thanks
-Kirill
On 12-Jul-12 16:20, Martin Desruisseaux wrote:
> Le 12/07/12 14:08, Kirill Prazdnikov a écrit :
>> Transformation matrix consist of four vectors. In case of affine, it
>> is coordinates of local orts + translation.
>> Accessing this vectors is the most get/set use-case.
>> I can not imagine where accessing individual matrix values could be
>> used (useful) at all.
>>
>> Does anybody uses it ?
>
> Well, then intend is to access the vectors by looping over
> (row,column) indices. In the current API, we can only access
> individual matrix values through named properties. This means that we
> can not use loops neither parametrized methods. For example in order
> to compute the magnitude of a vector (my previous email about "square
> root of the sum of ..." was a complicated way to said exactly that),
> we have to:
>
> * explicitly sum every terms as in sqrt(mxx*mxx + mxy*mxy + mxz*mxz);
> * duplicate the above code for every rows.
>
>
> While I admit that a loop doesn't save much in this example, some
> other use case are a bit more complicated. And the problem of
> duplicated code for every vector (row) remain. If a 'get(row, column)'
> method is provided, then a user can compute a vector magnitude in a
> single method where the vector number (row index) is given as a method
> argument.
>
> Martin
>
More information about the openjfx-dev
mailing list