<div dir="ltr"><div dir="ltr"><div>Here's a strawman Java interface. I'm hoping to get Web3D approval to use their package namespace. Note the return value has changed from class GeoLOD. Again, this is NOT for classes inside X3DJSAIL, but rather for classes that use instances of HAninHumanoid (among others) for now. So perhaps think of it as something a Script node or class could implement. More thought could be applied.</div><div><br></div><div>Thanks!</div><div><br></div><div>import java.util.List;</div><div><br></div><div>interface X3DRoots {</div><div> List<org.web3d.x3d.sai.Core.X3DNode> getRootNodeList();</div><div> // reserve getRootNode() for GeoLOD interface.</div><div>}</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 15, 2024 at 11:13 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">This was the only thing I could find on the X3DJSAIL Javadoc index “g” page: <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geospatial/GeoLOD.html#getRootNodeList()" target="_blank">https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Geospatial/GeoLOD.html#getRootNodeList()</a></div><br></div><div dir="auto">I’m hopeful that an X3DJSAIL interface with this method could be added to X3DJSAIL for X3dToJava.xslt and JavaSerializer.js generated classes to implement, such that I can reach into an HAnimHumanoid scene and find scale field, center fields, as well as translation fields and point fields for rescaling in a standardized fashion. That is, give me a Java class that implements the interface, and I can find the HAnimHumanoids in the returns with a recursive routine, and I can default scaling and translation in the humanoid.</div><div dir="auto"><br></div><div dir="auto">All because of long MF fields which can’t be matched in XML using X3DJSAIL, because of a poorly implemented/tested OpenJDK Pattern class. Plus, I want to generalize my code to handle HAnimHumanoids anywhere in the Java code.</div><div dir="auto"><br></div><div dir="auto">I don’t plan on forcing anyone to implement this interface, but I might alter my X3dToJava.xslt and JavaSerializer.js.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 15, 2024 at 6:21 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">This is part of the x3d execution context, but I don’t know if it’s an interface or a class. I am proposing a super interface which doesn’t require lots of methods to be defined.</div><div dir="auto"><br></div><div dir="auto"><a href="https://www.web3d.org/documents/specifications/19777-2/V3.0/Part2/functions.html#getRootNodes" target="_blank">https://www.web3d.org/documents/specifications/19777-2/V3.0/Part2/functions.html#getRootNodes</a></div><div dir="auto"><br></div><div dir="auto">It’s a perfectly good name for the method.</div></div><div><div dir="auto"><br></div><div dir="auto">John</div><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 15, 2024 at 5:59 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A need has come up such that classes including Java X3D models (instances of X3D class) provide a standard interface to one or more models in the Java class.<div dir="auto"><br></div><div dir="auto">Currently, there are two implementations:</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">JavaSerializer.js has an initialize() method which returns a X3D model. This probably violates SAI.</div><div dir="auto"><br></div><div dir="auto">X3dToJava.xslt provides a getX3dModel() method. There's also an incompatible initialize() method, which may follow SAI.</div><div dir="auto"><br></div><div dir="auto">There may be unknown implementations in Xj3D browser.</div><div dir="auto"><br></div><div dir="auto">I propose a new Java interface that returns an ArrayList or array or some kind of iterator instance from the method getX3dModels(). This will provide access to a collection of X3D instances in the class. This will allow both implementations to operate as they already do.</div><div dir="auto"><br></div><div dir="auto">The use case is to provide ways to output optimized (scaled) HAnim scenegraphs.</div><div dir="auto"><br></div><div dir="auto">Comments? Anyone want to propose the interface definition? Would this already be part of the Java SAI or abstract SAI, or can it be added?</div></div><div dir="auto"><div dir="auto"><br></div><div dir="auto">John</div><br></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>