Hi Uwe,

this is a code fragment that describes rotation of the viewpoint around an
object that is lying in the origin:
                        case EXAMINE:   //rotate Viewpoint
                        {
                                float angle = ROTATION_SCALE *
(float)Math.sqrt(deltaX * deltaX + deltaY * deltaY);
                                v3f = new Vector3f(-deltaY, deltaX, 0);
                                trans.transform(v3f);
                                temp.set(new AxisAngle4f(v3f.x, v3f.y,
v3f.z, angle));
                                trans.mul(temp, trans);
                                break;
                        }

deltaX, deltaY are coordinate differences describing the movement of the
mouse pointer.
temp is a Transform3D for calculation only.
v3f is a Vector3f  for calculation only.
ROTATION_SCALE is a float value for scaling.
trans is the Transform3D of your viewing TransformGroup.

Hope this helps :)

Gernot
[EMAIL PROTECTED]
http://www.janet.de



> -----Original Message-----
> From: Uwe Trostheide [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 06, 1999 12:49 PM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Rotating viewpoint ?
>
>
> Hello All,
>
> It is quite easy to rotate an object...but for my purpose it would be
> better to rotate the point of view around the point 0,0,0 instead.
> Has anybody an idea how to do this ?
>
> Thank you in advance,
>  Uwe                          mailto:[EMAIL PROTECTED]
>
> ==============================================================
> =============
> 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