Re: Painting on DisplayImplJ3D

Hi Mathias,

> I want to paint directly on a DisplayImplJ3D using the AWT. Therefore I
> tried two approaches:
> 
> 1.) Getting the component of the display and painting directly on it
> which doesn't work.
> 
> 2.) Using a JLayeredPane and do the paintings on a JPanel which lies
> "over" the 3d display which also doesn't work.
> 
> I think the problem is not a special VisAD problem but more a Java3D
> problem so please forgive me positng it here. Has anybody any
> suggestion?

Use the javax.media.j3d.J3DGraphics2D class to do this, as
documented at:

  
http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_2_API/j3dapi/index.html

Get it as:

  DisplayRendererJ3D dr = display.getDisplayRenderer();
  VisADCanvasJ3D canvas = dr.getCanvas();
  javax.media.j3d.J3DGraphics2D g2d = canvas.getGraphics2D();

You might want to search the java3d-interest mailing list
archive for information about J3DGraphics2D.

Good luck,
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


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