java - Plug-in display 3d-objects from VRML or X3D -
i'm not sure such plug-ins exist.. program displays data convertible vrml or x3d file, convenient if display rendered these files figures directly in window of program. can suggest plugin java or solution automate this?
if program generates or reads 3d mesh data (triangles) , able create string object containing defined x3d document representing these 3d objects java 3d(tm) api , xmodelimporter api might provide solution you.
xmodelimporter provides java 3d importers "extensible 3d (x3d)" files. in case 'com.interactivemesh.j3d.interchange.ext3d.xmodelreader' seems appropriate importer, alternatively 'com.interactivemesh.j3d.interchange.ext3d.xmodelloader'.
the xmodelreader imports x3d files accepting different sources 'java.io.file' , 'java.net.url' external data, 'java.io.reader' should applicable internal stored data, too.
following not tested scenario might work:
- write x3d document stringbuilder object
- create corresponding string object (stringbuilder.tostring)
- create java.io.stringreader instance x3d string
- create xmodelreader instance , import x3d data calling xmodelreader.read(java.io.reader reader)
- calling xmodelreader.getimport() returns array of 'javax.media.j3d.node' can rendered java 3d
java 3d https://java3d.java.net/binary-builds.html
xmodelreader http://www.java.net/node/706300
i'm not aware of "currently supported" ready go vrml or x3d players swing or javafx. instead of converting meshes , vrml or x3d might consider choosing 1 of 3d apis java platform , convert data directly related format.
august
Comments
Post a Comment