Re: lost of resolution when printing

Hi Vladimir,

> Some months ago you told me that it was impossible
> to create an offscreen DisplayImplJ3D (because of Java3D).
> 
> Does the new version of java3D allow it?

Yes. Our plan is to use Java3D classes, constructors and
methods that are specific to version 1.2.1 via reflection
so that our code will compile even for those folks who have
earlier versions of Java3D installed. However, in the case
of off screen rendering we discovered a situation that
Java reflection cannot handle. Specifically, our VisADCanvasJ3D
class extends Canvas3D in order to override its postSwap()
and renderField() methods, but then for off screen rendering
VisADCanvasJ3D must invoke the Canvas3D constructors directly
via "super(...)" rather than via reflection. This will cause
a compile error on a machine without Java3D version 1.2 or
later installed.

So our new VisADCanvasJ3D.java has a constructor for off screen
rendering that throws an Exception rather than working, and the
Exception directs you to comment-out some of its code and
uncomment some other code to actually get off-screen rendering.

I have attached a offscreen.jar file containing source for
DisplayImplJ3D.java, DisplayRendererJ3D.java and
VisADCanvasJ3D.java which you can unpack and compile in your
visad/java3d directory to get off screen rendering. However,
you must first edit VisADCanvasJ3D.java to comment-out some code
in its off screen constructor and uncomment some other code in
that constructor.

Sorry for the inconvience, but we try hard to make sure our
code is easy for everyone to compile.

The main() method of VisADCanvasJ3D.java is an example of
using off-screen rendering in a DisplayImplJ3D.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html

Attachment: offscreen.jar
Description: application/java-archive

  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: