Affine transforms - matrix algebra

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Thu Jul 12 14:19:09 PDT 2012


Le 12/07/12 22:48, Pavel Safrata a écrit :
> In JavaFX the (x,y) plane is very special. If you use the scene in 2D 
> you always work with the (x,y) plane. Any transform along z axis is 
> considered 3D.
Thanks. I was suspecting that but wasn't completely sure.

>> But in the Affine class, the mxz and myz coefficients can be 
>> anything. Consequently the transformations on the (x,y) plane may not 
>> be independent of z. If we extract the 2D part of that matrix, we 
>> would need to specify in the javadoc that this two-dimensional 
>> transform is valid only for z=0. For other values of z, the 
>> translation terms of the two-dimensional transform may be different. 
>> Do we really want to afford this additional complexity?
> I would probably leave responsibility on users. I think we could even 
> throw an exception when user tries to obtain 2D matrix from a 3D 
> transform.
I support the proposal of throwing an exception in such case.

> Better names might be MAT_2x3, MAT_3x4, MAT_4x4.
I agree, those names look quite clear to me.

     Martin



More information about the openjfx-dev mailing list