You need to create a transform which maps the field of view into the
textured quad:

   double consoleZ = 1.2;
   double fov = (double)universe.getView().getFieldOfView();
   consoleWidth = ((double)java.lang.Math.tan (fov / 2.0) * consoleZ)*2.0 ;

The console width is the number of pixels that you would see if you put a
textured quad aligned with the image plate and at consoleZ depth.  I am not
sure what you are planning, but it is not easy to do 2D rendering in java3d
(with good performance and memory consumption).

Dave Yazel


-----Original Message-----
From: Jean-Marie Dautelle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 3:47 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Pixel Mapping using Java3D


Hi,
I would like to use Java3D for 2D rendering.
All my objects dimensions are expressed in pixels.
Does someone knows how to setup Java3D such my object pixel size is
correctly
rendered on the screen (i.e. A 100x200 rectangle should  occupy a screen
area of
100x200 pixels).
My projection policy is View.PARALLEL_PROJECTION
Thanks.

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