[x3d-public] Discussion of API to generate X3D documents, based on X3D Object Model and X3DSAIL
yottzumm at gmail.com
Sun Feb 25 03:12:52 PST 2018
So I’m starting to work an API to generate X3D documents. I think I want something based on X3DObject in X3DJSAIL, probably as an extension of X3DJSAIL, so your help would be appreciated. I am thinking something like
X3DObject obj = X3DObject.generateSemiRandomScenegraph(seed);
X3DObject obj2 = X3DObject.generateCompleteScenegraph(seed);
Then similar to how toStringX3D() goes down through hierarchy, I would have a generate…Scenegraph(); at each node. I would need some probabilistic or occurrence-based configuration to generate the number of children and which attributes get set and which nodes get generated. My question becomes, how to I generate things which are dependent on each other? Like DEF/USE, Routes, and IndexedFaceSet attributes, for example. I think I can do this through something similar to validation, but I haven’t spent much time thinking about it--generateValid()??? Have you spent anytime thinking about it?
What do you think about extending X3DJSAIL, and how do I go about getting my changes integrated? Should I start a similar independent stylesheet which just does generation? Should I output a different language than Java?
Your thoughts are welcome!
The only reason I am doing this Is to test the schema. If you have a better approach, let me know!
Also, if anyone has done any occurrence-based analysis of X3D documents, I would be eager to hear about it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the x3d-public