Previously I have published modifications/additions to the toxiclibscore (version 20), that would facilitate the export of toxiclibs mesh objects to PovRAY mesh2, this approach produces a neat result, but does require re-compiling of toxiclibscore. Karsten recently published an application developed at a workshop http://toxiclibs.org/2011/12/metworks-workshop-facade/ this features a pre-release of version 21 of his libraries, so I was keen to see if my PovRAY export code would work with this library. In the absence of source code with the pre-release version, I coded a library to extend the toxiclibscore that allows direct exporting of either TriangleMesh, WETriangleMesh or an array of to a union of PovRAY mesh2 object/s. I also modified the FacadeApp class (from the workshop) see here:-
My povmesh library is available to download/test here. How it was done:- Karsten has kindly supplied the facade example as an eclipse project. I was able to import the eclipse project into NetBeans (I've never got on with eclipse, to do the import I ignored dependencies (Mac or Windows binaries are no good to me anyway), and I just needed to point the NetBeans project to the jogl binaries at run time. My library involved a bit of refactoring, and now favors composition over inheritance (much cleaner code). Here is the PovRAY output:-
![]() |
Mesh created by Facade Tool, directly exported as a PovRAY mesh2 object rendered with PovRAY 3.7beta |