You have to do a series of matrix (transform) multiplications to
effect the equivalent of a VRML transform group, which has a "center"
for rotation and scale.  In the following, _xform is the composite
Transform3D and _centerXform, _rotateXform, etc. are intermediate
geometric transforms.  You can also achieve the equivalent by stacking
a series of individual TransformGroups in the reverse order (i.e.
translation at the root end, center at the leaf end).

                        _xform.set(_centerXform);
                        _xform.mul(_rotateXform);
                        _xform.mul(_scaleXform);
                        _xform.mul(_centerNegXform);
                        _xform.mul(_xlateXform);

--jon

> Date: Mon, 31 May 1999 14:39:32 +1000
> From: "Leung, Sunny" <[EMAIL PROTECTED]>
> Subject: [java3d] Changing local coordinate system??
> 
> Hi All,
> 
> How can I shift the origin of a Shape3D object away from its centre? I want
> to pivot a box at one edge of it instead of rotating it at its centre.
> 
> Please help.
> 
> Thanks
> Sunny

-- 
____________________ Peculiar Technologies ____________________
Jon Barrilleaux       3800 Lake Shore Ave.         Purveyors of
[EMAIL PROTECTED]        Oakland, CA 94610      Alternate Reality
510.444.4370 voc                           Augmented Simulation
510.444.0231 fax        www.augsim.com         and 3D Solutions
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to