I really want to be able to load a .obj file and then, display it as a wireframe. I looked everywhere on the net and haven’t found anything. I wrote an algorithm but, it only works about half the time and, when it does, it just traces the vertices… it doesn’t connect all the correct sets of vertices in the correct places. Does anyone have any idea on how to do this? Thanks so much for any help…
There is a loader provided as part of Java 3D:
com.sun.j3d.loaders.objectfile.ObjectFile
Kev
I guess I wasn’t very specific. I have no problem loading an object file into my scenegraph using the ObjectFile loader… however, the problem that I DO have is that I want to render the wavefront object as a wireframe instead of the normal way that it is rendered (I guess it’s flat shading or something)… any tips? thanks…
One way to do it would be to recursively move through all the nodes in the Group object that the .obj loader returns. For every Shape3D (and subclass of Shape3D) object that is encountered in the graph, get the Appearance of the object and call setPolygonAttributes with a PolygonAttributes object that has POLYGON_LINE as its polygon mode.
Thank you so much… Worked like a charm
It was exactly what I was looking for…