# Transform point using localToSceneTransform

Jim Graham james.graham at oracle.com
Tue Jul 24 10:14:42 PDT 2012

```I've already commented on this in the matrix algebra thread, but I
wanted to throw into this discussion the following point:

I'm neutral on whether or not we need Vector - I'll leave that to the
people with extensive 3D experience to comment.  But, if transformation
of vectors makes better sense to do a delta transform, and if we are
adding deltaTransform() methods for other types (which I think we should
do), then I think the "transform" method that does a "delta transform"
on a Vector should actually be named "deltaTransform" for consistency,
even if it is obvious that a vector should only be transformed that way...

...jim

On 7/24/2012 3:29 AM, Pavel Safrata wrote:
>
> 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..
>
> Thanks,
> Pavel
```