> Date: Mon, 3 Jun 2002 19:42:49 -0700 > From: Vidya Sagar <[EMAIL PROTECTED]> > > look.invert(); // WHY? WHAT IS HAPPENING HERE > > I did not understand why they are using invert(). > Could anyone please explain what is the actual process > going on in the matrices.
You are using the matrix in the scene graph to position the ViewingPlatform in the virtual world, so it must transform points and vectors from the view platform coordinate system to the virtual world coordinate system. The original intent of Transform3D.lookAt() was as a compatibility-mode method to give the same result as OpenGL's lookAt() utility. Thus this matrix transforms points and vectors from world coordinates to eye coordinates. The intent was to pass this matrix directly into the View.setVpcToEc() compatibility-mode method, which needs a transform to go from world coordinates to eye coordinates. By default the Java 3D view model places the view platform at the eyepoint. So to use the result of lookAt() to position the view platform, you need to invert it. HTH -- Mark Hood =========================================================================== 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".
