if i've got something like this:
rootbranch
| |_________
| |
(no transform) transform X, say translates to right(4,0,0)
| |
| |
pointA pointB
(on a shape1) (on a shape2)
pointC
(i want to calculate C on shape 1, but the equation uses vector AB)
to get A in local coordinates to shape 2, i inverse X transform, to get
point A|. (i.e. move A -4 to the left, keeping B's coordinates the same, to
do the calculation)
then i calculate vector A| B. then i use the equation to calculate point C
relative to shape2's coordinate system, C|. (say i get shape2's origin as my
answer)
then i transformX C| to get it back in shape1's coordinate system, C?
(so it'll be 4 to the right of A's origin)
why, when i do this, and test it by:
// pseudocode testing that transform*local coordinates = world
coordinates
// doesn't work!!!
Point3d GlobalPoint=whatever
Point3d LocalPoint=new Point3d(inverseTrans.transform(GlobalPoint))
Vector3d LocalDirectionVector=whatever
Vector3d GlobalDirectionVector=new
Vector3d(Trans.transform(GlobalDirection))
Point3d newGlobalPoint=GlobalPoint+GlobalDirectionVector
Point3d newLocalPoint=LocalPoint+LocalDirectionVector
check newGlobalPoint=Trans.transform(newLocalPoint)
doesn't it work?
Shamim Khaliq [EMAIL PROTECTED] <http://www.shamimkhaliq.co.uk/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".