Transform point using localToSceneTransform
pavel.safrata at oracle.com
Tue Jul 24 03:29:09 PDT 2012
On 23.7.2012 17:47, Pedro Duque Vieira wrote:
>>> 1- public Vector3D transform(Vector3D point)
>>> This implies having a Vector class which I think is appropriate. Vector
>>> objects may be used to represent translation, surface normals, pick rays,
>>> or other things
>> Is the existing Point3D not sufficient?
> No. Imagine someone reading a piece of code that represents surface normals
> and pick rays as a Point3D, not very understandable. Also it's useful to
> compute angles between vectors, cross product, magnitude of the vector, ...
We already use Point3D as a vector. It seems that publicly it's
currently only in Rotate - as rotation axis. So we can either continue
to do that - J2D does this as well - and possibly provide the vector
methods in Point3D, or we need to introduce new Vector3D and Vector2D
and deprecate the now wrong Point3D usage in Rotate. To me it seems it
might really be clearer to introduce the vectors, but I think Richard
should comment when abandoning old API comes to play..
More information about the openjfx-dev