If you think about it, scaling is actually the linear translation of the
vertices with respect to their distance from the origin.  If the
"center" of your object is not on the origin, then the "center" will be
effectively moved.

If your object's center (about which you wish to scale) is not at the
origin, then you need to translate it there, then scale it, then
translate it back.  The transform3d should be built by making a
translation transform to move it to the center, multiply that by the
scaling transform, and then multiply that be the transform to move it
back.

This really depends on how your scenegraph is set up.  I usually make my
objects in their own local coordinate system so I can scale them there
before they are translated.

If you need more help, give more details about your scene graph.

-Lee


> -----Original Message-----
> From: Tina Manoharan Valappil [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Scaling without Translation !!
>
>
>         Hello,
>
>         I am trying to do non-uniform scaling but I found that it is
>         not only scaling but even translating. Is there anyway I can
>         stop it from translating ??
>
>         When I get the translation values and print them they are the
>         same all the times, so then why is the object translating??
>
>         Thanks for any help!!
>         Tina
>
>
> Tina Manoharan
> PhD, Heriot Watt University
> Edinburgh, 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".
>

===========================================================================
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".

Reply via email to