LocalToScene Transformation (related to Affine Transforms)

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Fri May 11 03:20:22 PDT 2012


Hello Pavel

Right, I was not expecting the scene graph to support such general 
transform. To make my long email short, I was just pointing that adding 
'getScaleX()', 'getScaleY()' and similar methods in the 'Transform' 
class effectively restrict the Transform class to the Affine case, in 
which case the current class names become problematic. Using a 
'getMatrix' method (we could find a better name) with a 'Point3d' 
argument would solve the conceptual problem, without obligation for 
JavaFX to support such general transforms - that would be left to users 
(I would be fine with JavaFX throwing an exception if given a 
unrecognized transform).

The intend was just to avoid a class naming problem while keeping the 
current class hierarchy, and keeping door open for non-linear transforms 
in the future.

     Regards,

         Martin


Le 11/05/12 11:09, Pavel Safrata a écrit :
> Hello Martin,
> your comments make perfect sense. However, I seriously doubt our scene 
> graph would ever be able to operate with such general transformations. 
> Apart from the fact that we would most probably have a great trouble 
> to implement all the existing functionality if such transformations 
> were allowed, it would bring a serious performance drop and would 
> create an API considerably less handy for the usual cases. Anyway, if 
> we decide that the naming issue is serious and/or that we want to 
> leave the door open to the generic transforms, we can do following: 
> insert a new class (say AffineBase) as a subclass of Transform and 
> superclass of all the existing transforms, then go with our proposed 
> solution using AffineBase instead of Transform. To me it seems as a 
> good thing to do.



More information about the openjfx-dev mailing list