I need to use typical Java 2D java.awt.Shapes (Rectangle2D, RoundRectangle2D, …) in my 3D Scene.
I know one way to use them is by means of JMEDesktop, but…
…how can I use this Java 2D API in jME directly, without using JMEDesktop? Is it possible?
May be Glyph is the answer, as used in Font3D, for instance?
A more efficient and direct way would be to draw those shapes by generating 3D geometry, but generally this would only be viable if its an integral part of your application..
What do you exactly mean, Momoko_Fan? Any example to illustrate that?
I would like to have the possibility to convert any Java 2D Shape into a Geometry, a mesh, an Spatial, which I could treat as any other 3D object. I mean, imagine that I use RoundRectangle2D (java.awt.Shape) to create a 3D Object with its borders, edges, and sides, describing exactly that geometry in 3D. That's what I am trying to find out.
I wouldn't like to have an image... but I would like a java.awt.Shape transformed to an Spatial, yes ;)
You can paint directly to a texture using the ImageGraphics class in jME.
A more efficient and direct way would be to draw those shapes by generating 3D geometry, but generally this would only be viable if its an integral part of your application…