[x3d-public] Possible problem with X3dToJava.xslt, extra commas in coord Inex
John Carlson
yottzumm at gmail.com
Sat Jul 29 03:44:22 PDT 2023
I'm getting extra comments in the java code generated by X3dToJava.xslt.
Apparently there's no X3D to Java in X3D-Edit?
Here's some sample generated Jav (see extra commas):
.setGeometry(new
IndexedFaceSet("Backing").setDEF("Backing").setCoordIndex(new int[]
{0,,1,,2,,3,,-1})
.setGeometry(new IndexedLineSet().setCoordIndex(new int[]
{0,,1,,-1,,0,,2,,-1,,0,,3,,-1})
.
Here's the XML (I believe this is from Holger, because it has her name on
it).
<IndexedFaceSet DEF='Backing'
coordIndex='0, 1, 2, 3, -1'>
<Coordinate
point='-0.2 -0.25 -0.01, 3 -0.25 -0.01, 3 1 -0.01, -0.2
1 -0.01'/>
</IndexedFaceSet>
setPoint is OK in the Java, it's the setCoordIndex and setSkinCoordIndex.
Recommendations:
1) X3dToJava.xslt should not add commas when commas are already there.
Perhaps strip commas before adding them? With both
setCoordIndex and setSkinCoordIndex
2) Holger's x3d-tidy should not introduce commas if they are not already
there (I'm fairly sure the original is some form of VRML. The VRML file
appears to be the oldest of relevant file names.
3) If Joe wants to provide the file, it's JoeLevel2LOA3SSPYRWRJKHud.x3dv, I
think.
I'm going to delete the Java code because I'm having issues with my new
gradle build.
More to come, we get better and better with each new example!
Thanks!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230729/2a0c0f0f/attachment.html>
More information about the x3d-public
mailing list