My solution to this was to create two TransformGroups that were the roots of my 
"world" objects. The topmost TransformGroup I used for each of the mouse behaviors to 
(zoom, rotate, translate) operate on. The TransformGroup below this I used as the 
pivot point of my mouse rotation. In other words, this TransformGroup translates the 
object you want to rotate back to the origin and the parent TransformGroup rotates it. 
I hope that makes sense.

Sean


> -----Original Message-----
> From: Vidya Sagar [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 03, 2002 7:48 PM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Rotations
> 
> 
> Hi all,
>        I am rotating an object on the screen. It seems
> to be rotating in a circular path, instead of rotating
> on its own axis.
> 
> In OpenGl, we can correct it by translating the object
> to the origin and then apply transformations, and
> again retranslate the object to its original place.
> 
> Is this the way to do in Java3D. Can anyone give a
> sample code.
> 
> Thanks,
> Sagar.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
> 
> ==============================================================
> =============
> 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".
> 

Attachment: rotate.java
Description: rotate.java

Reply via email to