Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690