Java3D: Painting 2D HUD over Canvas3D

I am using Java3D to render a three-dimensional scene. I would like to lay out a two-dimensional heads-up display on top of the three-dimensional image. How can I effectively draw 2d content on top of a three-dimensional canvas?

Thanks!

+4
source share
1 answer
// Create a Canvas3D using the preferred configuration Canvas3D canvas3d = new Canvas3D(config) { private static final long serialVersionUID = 7144426579917281131L; public void postRender() { this.getGraphics2D().setColor(Color.white); this.getGraphics2D().drawString("Heads Up Display (HUD) Works!",100,100); this.getGraphics2D().flush(false); } }; 
+6
source

Source: https://habr.com/ru/post/1305742/


All Articles