[x3d-public] More Object Model Work: indicating nodes and statements for each profile within object model and X3DJSAIL

Don Brutzman brutzman at nps.edu
Thu Aug 31 08:03:36 PDT 2017


Other than node listings, and shared X3D statements, there aren't any fully 
defined relationships between components.  While the primary profiles 
Core/Interchange/Interactive/Immersive are strict subsets/supersets of each 
other, the remaining profiles (CADInterchange, Medical) are not.

Interesting tangent I added version numbers for each node and statement to the 
X3D Node Inventory Comparisons spreadsheet last week (tab 2, pages 4-8).

http://www.web3d.org/specifications/X3dNodeInventoryComparison.xlsx
http://www.web3d.org/specifications/X3dNodeInventoryComparison.pdf

If you do some spreadsheet sorting by version, you discover that all of the 
profiles are consistent across all X3D versions 3.0 through 3.3.  That's 
useful.  (Slight difference: CADInteractive starts in v3.1 and Medical starts in 
v3.3, but each remains consistent across subsequent X3D versions.)

On 8/31/2017 5:44 AM, John Carlson wrote:
> Don, is there anything in the object model for relationships between profiles? 
>   Thanks!
>
> John
>
> On Aug 31, 2017 3:48 AM, "Don Brutzman" <brutzman at nps.edu 
> <mailto:brutzman at nps.edu>> wrote:
>
>     On 8/30/2017 10:23 AM, John Carlson wrote:
>
>         Looks okay to me.
>
>
>     Thanks for double checks.
>
>         On Aug 30, 2017 12:47 PM, "Don Brutzman" <brutzman at nps.edu
>         <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu
>         <mailto:brutzman at nps.edu>>> wrote:
>
>             OK, have amended X3D XML Schema to include allowed nodes under
>         each profile.  Also added allowed X3D statements under Core profile.
>
>             Documentation at
>         http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3_profileNames.html#LinkDC
>         <http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3_profileNames.html#LinkDC>
>         <http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3_profileNames.html#LinkDC
>         <http://www.web3d.org/specifications/X3dSchemaDocumentation3.3/x3d-3.3_profileNames.html#LinkDC>>
>
>
>
>             Next: have extracted these node and statement lists for inclusion
>         in the X3D Unified Object Model profile information.
>
>             Result excerpt follows.  Please look at syntax, hope it looks OK. 
>         As this gets integrated, will next apply by generating
>         profile-validation tests in source code for X3DJSAIL.[...]
>
>
>     OK have taken the next step: added validation of profile and component
>     information for each node in the respective validate() methods.
>
>     Example excerpt from AnchorObject follows, where Anchor-specific values
>     for profiles/component/level get plugged in from entries in
>     X3DObjectModel-3.3.xml:
>
>     // profile validation test, if connected to full scene
>     if (findAncestorX3DObject() != null)
>     {
>             String     modelProfile = findAncestorX3DObject().getProfile();
>             headObject modelHead    = findAncestorX3DObject().getHead();
>             ArrayList<componentObject> sceneComponentsList = new ArrayList<>();
>             if (modelHead != null)
>                     sceneComponentsList = modelHead.getComponentList();
>             boolean hasSatisfactoryComponent = false;
>             for (componentObject nextComponent : sceneComponentsList)
>             {
>                     if ( nextComponent.getName().equals("Networking") &&
>                             (nextComponent.getLevel() >= 2))
>                             hasSatisfactoryComponent = true;
>             }
>             if (!hasSatisfactoryComponent &&
>                     !modelProfile.equals("CADInterchange") &&
>                     !modelProfile.equals("Interactive") &&
>                     !modelProfile.equals("Immersive") &&
>                     !modelProfile.equals("MedicalInterchange") &&
>                     !modelProfile.equals("MPEG4Interactive") &&
>                     !modelProfile.equals("Full"))
>             {
>                     String errorNotice =
>     ConfigurationProperties.ERROR_ILLEGAL_VALUE +
>                             ": invalid X3D profile='" +
>     getContainerFieldOverride() +
>                             "' for parent X3D model, add element
>     <componentInfo name='Networking' level='2'/> or assignment " +
>                             "'
>     findAncestorX3DObject().getHead().addComponentInfo(\"Networking\").setLevel(2);";
>                     validationResult.append(errorNotice).append("\n");
>                     throw new InvalidFieldException(errorNotice); // report error
>             }
>     }
>
>     Tested satisfactorily on HelloWorldProgram.java which indeed
>     self-diagnosed itself to reveal a missing component entry for Layering
>     level 1.
>
>     Test program runs satisfactorily, a few other quirks appear to be
>     adjusted/fixed.  Now running recently released Java JDK version "1.8.0_141".
>
>     Updates now uploading, autogeneration stylesheet changes and smoke tests
>     checked in, this new release should be available in about an hour.
>
>     http://www.web3d.org/specifications/java/X3DJSAIL.html
>     <http://www.web3d.org/specifications/java/X3DJSAIL.html>
>
>     Looking things over, will probably add class constants for minimum
>     COMPONENT and LEVEL later to simplify programmer access.
>
>
>     all the best, Don
>     -- 
>     Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu
>     <mailto:brutzman at nps.edu>
>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
>     <tel:%2B1.831.656.2149>
>     X3D graphics, virtual worlds, navy robotics
>     http://faculty.nps.edu/brutzman <http://faculty.nps.edu/brutzman>
>
>




More information about the x3d-public mailing list