Transform point using localToSceneTransform
Pedro Duque Vieira
pedro.duquevieira at gmail.com
Tue Jul 24 16:34:25 PDT 2012
Maybe we're talking about two different ways of performing the same
calculations, probably we come from different backgrounds.
What I meant with Vector3d is a 4x1 matrix with the last element as 0
(homogeneous coordinates). We can then have methods on the Vector3d class
to give us things we expect to retrieve from vectors: like angle,
magnitude, doing the cross product of two vectors, calculating the angle
between two vectors.
As a reference one can look at the java3d implementation of Vector3d:
Thanks, best regards,
On Wed, Jul 25, 2012 at 12:06 AM, Jim Graham <james.graham at oracle.com>wrote:
> Hi Pedro,
> delta transform is transform without translation. It is primarily used to
> transform magnitudes that have no position so you only modify them with the
> scale, shear, and rotation aspects of the matrix (i.e. everything but the
> translate components).
> For some reason I got the impression that Vector was only used to
> represent magnitude because people were bringing up delta transforms in the
> context of talking about it. If it is a 1x4 vector then it is just
> Point3D+perspective-w-element, [x,y,z,w] no? Point3D can participate in
> 4x4 transforms, supplying an implicit w=1 component, though it can't store
> the resulting w component if the matrix doesn't have 0,0,0,1 for the last 4
> elements (i.e. in perspective camera matrices)...
> On 7/24/2012 3:55 PM, Pedro Duque Vieira wrote:
>> 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
>> I don't know what a delta transform is (never used it on my 3d work
>> background), so I cannot comment on that part.
>> All I can say is that I did use transform a vector by a given matrix
>> transform and it makes sense. It's basically a multiplication of a 4x4
>> matrix transform with a 1x4 matrix, just like what happens when you
>> transform a point3d.
>> So I think:
>> - void transform(Vector3d)
>> Should be present on the transform3d class.
>> Just my 2 cents,
Pedro Duque Vieira
More information about the openjfx-dev