Justin Couch wrote:
M. Halpin wrote:
Anyway, so I was wondering if anyone knew of a way to load/convert SVGs into something Java3D can render as polygons?
Since SVG is an XML-based language, with a bit of XSLT hacking, you could transform it to X3D and then use one of the loaders available for that.
The main problem here is that writing the XSLT would be a serious pain, because although SVG is XML-based, it stores a lot of relevant data in non-XML structures. By this I mean you get code like
<g transform="translate(10 11) "> <path d="M 0.016 291.000 L 0.016 294.000" stroke="rgb(0,0,0)" /> ...
Rather than
<g> <transform method="translate" x="10" y="10"/> <path>
<stroke><rgb_palette><red>0</red><green>0</green><blue>0</blue></rgb_palette></stroke> ...
The latter, although more verbose, could be manipulated by standard XSLT methods. The former requires deep XPath kung fu and declarative recursion programming to pick apart. The SVG folks went for conciseness rather than ease of transformation. :-(
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".