See: Description
| Package | Description |
|---|---|
| org.web3d.x3d.jsail |
The X3D Java Scene Access Interface Library (X3DJSAIL) provides a comprehensive
set of
strongly typed X3D Java interfaces for concrete implementation classes.
|
| org.web3d.x3d.jsail.CADGeometry |
The CADGeometry component is provided for Computer-Aided Design (CAD) nodes.
|
| org.web3d.x3d.jsail.Core |
The Core component supplies the base functionality for the X3D run-time system, including
the abstract base node type, field types, the event model, and routing.
|
| org.web3d.x3d.jsail.CubeMapTexturing |
The Cube Map Environmental Texturing component describes how additional texturing
effects are defined to produce environmental effects such as reflections from objects.
|
| org.web3d.x3d.jsail.DIS |
The Distributed Interactive Simulation (DIS) component provides networked interoperability
with the IEEE DIS protocol for sharing state and conducting real-time platform-level
simulations across multiple host computers.
|
| org.web3d.x3d.jsail.EnvironmentalEffects |
Nodes in the Environmental effects component support the creation of realistic environmental
effects such as panoramic backgrounds and fog.
|
| org.web3d.x3d.jsail.EnvironmentalSensor |
The Environment Sensor nodes emit events indicating activity in the scene environment,
usually based on interactions between the viewer and the world.
|
| org.web3d.x3d.jsail.EventUtilities |
The Event Utility nodes provide the capability to filter, trigger, convert, or sequence
numerous event-types for common interactive applications without the use of a Script
node.
|
| org.web3d.x3d.jsail.fields |
The fields subpackage is provided for creating
typed X3D field values
and also includes various utility capabilities.
|
| org.web3d.x3d.jsail.Followers |
The Follower nodes (Chasers and Dampers) support dynamic creation of smooth parameter
transitions at run time.
|
| org.web3d.x3d.jsail.Geometry2D |
The Geometry2D component defines how two-dimensional geometry is specified and what
shapes are available.
|
| org.web3d.x3d.jsail.Geometry3D |
The Geometry3D component describes how three-dimensional geometry is specified and
defines ElevationGrid, Extrusion, IndexedFaceSet, and most primitive geometry nodes
(Box, Cone, Cylinder, Sphere).
|
| org.web3d.x3d.jsail.Geospatial |
The Geospatial component defines how to associate real-world locations in an X3D scene
and specifies nodes particularly tuned for geospatial applications.
|
| org.web3d.x3d.jsail.Grouping |
The Grouping component describes how nodes are organized into groups to establish
a transformation hierarchy for the X3D scene graph.
|
| org.web3d.x3d.jsail.HAnim |
The Humanoid Animation (H-Anim) component for X3D defines node bindings and other
details for implementing ISO/IEC 19774, the H-Anim International Specificaiton.
|
| org.web3d.x3d.jsail.Interpolation |
Interpolator nodes provide keyframe-based animation capability.
|
| org.web3d.x3d.jsail.KeyDeviceSensor |
The Key Device Sensor defines how keyboard keystrokes are inserted into an X3D world.
|
| org.web3d.x3d.jsail.Layering |
The Layering component describes how to layer a set of subscene layers into a composite
scene.
|
| org.web3d.x3d.jsail.Layout |
The Layout component defines how to precisely position content in a scene in relation
to the rendered results, especially for integrating 2D content with 3D content.
|
| org.web3d.x3d.jsail.Lighting |
The Lighting component specifies how light sources are defined and positioned, as
well as how lights effect the rendered image.
|
| org.web3d.x3d.jsail.Navigation |
The Navigation component specifies how a user can effectively and intuitively move
through and around a 3D scene.
|
| org.web3d.x3d.jsail.Networking |
The Networking component defines node types and other features used to access file-based
and streaming resources on the World Wide Web.
|
| org.web3d.x3d.jsail.NURBS |
The NURBS component describes Non-uniform Rational B-Spline (NURBS) geometry and interpolation
nodes.
|
| org.web3d.x3d.jsail.ParticleSystems |
The Particle Systems component specifies how to model particles and their interactions
through the application of basic physics principles to affect motion.
|
| org.web3d.x3d.jsail.Picking |
The Picking component provides the ability to test for arbitrary object collision
and provide basic capabilities to detecting object intersections and interactions.
|
| org.web3d.x3d.jsail.PointingDeviceSensor |
Pointing device sensor nodes detect pointing events from user-interface devices, defining
activities such as a user selecting a piece of geometry.
|
| org.web3d.x3d.jsail.Rendering |
The Rendering component includes fundamental rendering primitives such as TriangleSet
and PointSet nodes, as well as geometric properties nodes that define how coordinate
indices, colors, normals and texture coordinates are specified.
|
| org.web3d.x3d.jsail.RigidBodyPhysics |
The Rigid Body Physics component describes how to model rigid bodies and their interactions
through the application of basic physics principles to effect motion.
|
| org.web3d.x3d.jsail.Scripting |
The Script component describes how Script nodes are used to effect changes in X3D
worlds.
|
| org.web3d.x3d.jsail.Shaders |
The programmable shaders component describes how programmable shaders are specified
and how they affect the visual appearance of geometry.
|
| org.web3d.x3d.jsail.Shape |
The Shape component defines nodes for associating geometry with their visible properties
and the scene environment.
|
| org.web3d.x3d.jsail.Sound |
The Sound component defines how sound is delivered to an X3D world as well as how
sounds are accessed.
|
| org.web3d.x3d.jsail.Text |
The Text component defines how text strings are rendered in an X3D scene.
|
| org.web3d.x3d.jsail.Texturing |
The Texturing component specifies how 2D texture images are defined and then positioned
on associated geometry.
|
| org.web3d.x3d.jsail.Texturing3D |
The Texturing3D component specifies how 3D volumetric textures describe surface properties
as data points in a volume of space, rather than a flat surface.
|
| org.web3d.x3d.jsail.Time |
The Time component defines how time is sensed, computed and associated with events
in an X3D scene.
|
| org.web3d.x3d.jsail.VolumeRendering |
The Volume Rendering component provides the ability to specify and render volumetric
data sets.
|
| org.web3d.x3d.sai |
The X3D Java Scene Access Interface (SAI) package is designed to
provide access to a browser and its contained scene graph,
either within an internal X3D Script node or an external HTML script.
|
| org.web3d.x3d.sai.CADGeometry |
The CADGeometry component is provided for Computer-Aided Design (CAD) nodes.
|
| org.web3d.x3d.sai.Core |
The Core component supplies the base functionality for the X3D run-time system, including
the abstract base node type, field types, the event model, and routing.
|
| org.web3d.x3d.sai.CubeMapTexturing |
The Cube Map Environmental Texturing component describes how additional texturing
effects are defined to produce environmental effects such as reflections from objects.
|
| org.web3d.x3d.sai.DIS |
The Distributed Interactive Simulation (DIS) component provides networked interoperability
with the IEEE DIS protocol for sharing state and conducting real-time platform-level
simulations across multiple host computers.
|
| org.web3d.x3d.sai.EnvironmentalEffects |
Nodes in the Environmental effects component support the creation of realistic environmental
effects such as panoramic backgrounds and fog.
|
| org.web3d.x3d.sai.EnvironmentalSensor |
The Environment Sensor nodes emit events indicating activity in the scene environment,
usually based on interactions between the viewer and the world.
|
| org.web3d.x3d.sai.EventUtilities |
The Event Utility nodes provide the capability to filter, trigger, convert, or sequence
numerous event-types for common interactive applications without the use of a Script
node.
|
| org.web3d.x3d.sai.Followers |
The Follower nodes (Chasers and Dampers) support dynamic creation of smooth parameter
transitions at run time.
|
| org.web3d.x3d.sai.Geometry2D |
The Geometry2D component defines how two-dimensional geometry is specified and what
shapes are available.
|
| org.web3d.x3d.sai.Geometry3D |
The Geometry3D component describes how three-dimensional geometry is specified and
defines ElevationGrid, Extrusion, IndexedFaceSet, and most primitive geometry nodes
(Box, Cone, Cylinder, Sphere).
|
| org.web3d.x3d.sai.Geospatial |
The Geospatial component defines how to associate real-world locations in an X3D scene
and specifies nodes particularly tuned for geospatial applications.
|
| org.web3d.x3d.sai.Grouping |
The Grouping component describes how nodes are organized into groups to establish
a transformation hierarchy for the X3D scene graph.
|
| org.web3d.x3d.sai.HAnim |
The Humanoid Animation (H-Anim) component for X3D defines node bindings and other
details for implementing ISO/IEC 19774, the H-Anim International Specificaiton.
|
| org.web3d.x3d.sai.Interpolation |
Interpolator nodes provide keyframe-based animation capability.
|
| org.web3d.x3d.sai.KeyDeviceSensor |
The Key Device Sensor defines how keyboard keystrokes are inserted into an X3D world.
|
| org.web3d.x3d.sai.Layering |
The Layering component describes how to layer a set of subscene layers into a composite
scene.
|
| org.web3d.x3d.sai.Layout |
The Layout component defines how to precisely position content in a scene in relation
to the rendered results, especially for integrating 2D content with 3D content.
|
| org.web3d.x3d.sai.Lighting |
The Lighting component specifies how light sources are defined and positioned, as
well as how lights effect the rendered image.
|
| org.web3d.x3d.sai.Navigation |
The Navigation component specifies how a user can effectively and intuitively move
through and around a 3D scene.
|
| org.web3d.x3d.sai.Networking |
The Networking component defines node types and other features used to access file-based
and streaming resources on the World Wide Web.
|
| org.web3d.x3d.sai.NURBS |
The NURBS component describes Non-uniform Rational B-Spline (NURBS) geometry and interpolation
nodes.
|
| org.web3d.x3d.sai.ParticleSystems |
The Particle Systems component specifies how to model particles and their interactions
through the application of basic physics principles to affect motion.
|
| org.web3d.x3d.sai.Picking |
The Picking component provides the ability to test for arbitrary object collision
and provide basic capabilities to detecting object intersections and interactions.
|
| org.web3d.x3d.sai.PointingDeviceSensor |
Pointing device sensor nodes detect pointing events from user-interface devices, defining
activities such as a user selecting a piece of geometry.
|
| org.web3d.x3d.sai.Rendering |
The Rendering component includes fundamental rendering primitives such as TriangleSet
and PointSet nodes, as well as geometric properties nodes that define how coordinate
indices, colors, normals and texture coordinates are specified.
|
| org.web3d.x3d.sai.RigidBodyPhysics |
The Rigid Body Physics component describes how to model rigid bodies and their interactions
through the application of basic physics principles to effect motion.
|
| org.web3d.x3d.sai.Scripting |
The Script component describes how Script nodes are used to effect changes in X3D
worlds.
|
| org.web3d.x3d.sai.Shaders |
The programmable shaders component describes how programmable shaders are specified
and how they affect the visual appearance of geometry.
|
| org.web3d.x3d.sai.Shape |
The Shape component defines nodes for associating geometry with their visible properties
and the scene environment.
|
| org.web3d.x3d.sai.Sound |
The Sound component defines how sound is delivered to an X3D world as well as how
sounds are accessed.
|
| org.web3d.x3d.sai.Text |
The Text component defines how text strings are rendered in an X3D scene.
|
| org.web3d.x3d.sai.Texturing |
The Texturing component specifies how 2D texture images are defined and then positioned
on associated geometry.
|
| org.web3d.x3d.sai.Texturing3D |
The Texturing3D component specifies how 3D volumetric textures describe surface properties
as data points in a volume of space, rather than a flat surface.
|
| org.web3d.x3d.sai.Time |
The Time component defines how time is sensed, computed and associated with events
in an X3D scene.
|
| org.web3d.x3d.sai.VolumeRendering |
The Volume Rendering component provides the ability to specify and render volumetric
data sets.
|
![]() |
X3D Java Scene Access Interface Library (X3DJSAIL) |
![]() |
X3D Java Scene Access Interface Library (X3DJSAIL) supports programmers with standards-based X3D Java interfaces and objects, all as open source.
Abstract | Codebase | CLASSPATH and Command Line | Conversions | Design Features | Downloads | Examples | EXI | Javadoc | License | Other Implementations | README | References | Specification Changes | TODO | Utility Methods | Contact
X3DJSAIL, the X3D Java Scene Access Interface Library is a set of strongly typed Java application programming interfaces (APIs) providing programmer access to an X3D scene graph. Two open-source Java packages are included that contain X3D SAI interfaces and support the X3D Standards for Java programmers.
org.web3d.x3d.jsail provides concrete implementation-oriented classes for building X3D scenes using standalone Java objects.
org.web3d.x3d.sai contains standard X3D SAI interfaces to independently compile Script-node source for use in X3D players.
Available products include Javadoc documentation, several thousand self-validating Examples, source code, compiled classes build support, run-time jar archives, and draft specification annexes for node interfaces and abstract-node type interfaces.
Goals include making it easy to create an X3D scene graph using Java, while also making it hard to create an incorrect or invalid X3D model.
This library supports multiple uses:
This work implements the X3D Unified Object Model (X3DUOM) in support of complete current and emerging X3D Specification capabilities.
version 1.0 release is complete following satisfactory conversions of all
X3D Examples Archives..
Javadoc links are provided for all archives. See
build.log.java.txt
for console logs from all examples.
TODO under active development: the X3DJSAIL library-creation files currently require multiple external assets and local configuration. Ongoing work will combine these and other resources into an independently buildable project.
Command line invocation is feasible through use of the org.x3d.jsail.CommandLine class.
Note that model validation is always performed as part of X3DJSAIL operations.
java -classpath someLocalPath/X3DJSAIL.3.3.full.jar
[sourceModel.x3d | package.path.ProgramName | -help | -page | -resources | -tooltips]
[-tofile [resultFile.*]] [-properties [propertiesFile]] [-validate]
[sourceModel.exi -fromEXI] [sourceModel.gz -fromGZIP] [sourceModel.zip -fromZIP]
[-toX3D | -toXML | -toHTML | -toMarkdown | -toTidy | -toClassicVrml | -toJava | -toJSON | -toVRML97 | -toX3DOM | -toX_ITE | -toGZIP | -toZIP]
Example:
java -classpath someLocalPath/X3DJSAIL.3.3.full.jar org.web3d.x3d.jsail.CommandLine -help
Example:
java -classpath someLocalPath/X3DJSAIL.3.3.full.jar org.web3d.x3d.jsail.CommandLine HelloWorld.x3d -toVRML97 -toFile
X3DJSAIL.3.3.full.jar
Example CLASSPATH confirmation:
% echo $CLASSPATH
CLASSPATH='C:\x3d-code\www.web3d.org\x3d\stylesheets\java\jars\X3DJSAIL.3.3.full.jar'
Alternative: For developers, an alternative CLASSPATH configuration is "skinny jar"
X3DJSAIL.3.3.classes.jar
but note that Saxon stylesheet engine and other EXI .jar dependencies must also be provided.
% echo $CLASSPATH
CLASSPATH='C:\x3d-code\www.web3d.org\x3d\stylesheets\java\jars\X3DJSAIL.3.3.classes.jar;
C:\x3d-code\www.web3d.org\x3d\stylesheets\java\lib\saxon9he.jar;
C:\x3d-code\www.web3d.org\x3d\stylesheets\java\lib\exificient-gui-jar-with-dependencies.jar;
C:\x3d-code\www.web3d.org\x3d\stylesheets\java\lib\nagasena.jar'
java org.web3d.x3d.jsail.CommandLine
[sourceModel.x3d | package.path.ProgramName | -help | -page | -resources | -tooltips]
[-tofile [resultFile.*]] [-properties [propertiesFile]] [-validate]
[sourceModel.exi -fromEXI] [sourceModel.gz -fromGZIP] [sourceModel.zip -fromZIP]
[-toX3D | -toXML | -toHTML | -toMarkdown | -toTidy | -toClassicVrml | -toJava | -toJSON | -toVRML97 | -toX3DOM | -toX_ITE | -toGZIP | -toZIP]
Example:
java org.web3d.x3d.jsail.CommandLine -help
Example:
java org.web3d.x3d.jsail.CommandLine HelloWorld.x3d -toClassicVRML
Example:
java org.web3d.x3d.jsail.CommandLine HelloWorld.x3d.gz -fromGZIP
<target name="test.X3DJSAIL" depends="" description="Test X3DJSAIL" >
<echo message="==========================================="/>
<echo message="helpful invocations for CommandLine debugging"/>
<echo message="org.web3d.x3d.jsail.CommandLine -help"/>
<java classname="org.web3d.x3d.jsail.CommandLine"
classpath="${saxon.dir}/${saxon.jar};${java.jars.dir}/${jsai.full.archive.jar.name};.">
<arg value="-help"/>
</java>
<echo message="==========================================="/>
<echo message="org.web3d.x3d.jsail.CommandLine -properties ${java.examples.dir}/X3DJSAIL.properties"/>
<java classname="org.web3d.x3d.jsail.CommandLine"
classpath="${saxon.dir}/${saxon.jar};${java.jars.dir}/${jsai.full.archive.jar.name};.">
<arg value="-properties"/>
<arg value="${java.examples.dir}/X3DJSAIL.properties"/>
</java>
</target>
System.out.println ("===========================================");
System.out.println ("Test CommandLine invocations");
String[] args = {"-help" };
System.out.println ("CommandLine " + Arrays.toString(args));
CommandLine.run (args); // run these commands
System.out.println ("===========================================");
args = new String[] {"HelloWorldProgramOutput.x3d", "-toX3D", "-toFile", "HelloWorldProgramOutput.CommandLine.x3d" };
System.out.println ("CommandLine " + Arrays.toString(args));
CommandLine.run (args); // run these commands
System.out.println ("===========================================");
args = new String[] {"HelloWorldProgramOutput.x3d", "-EXIFICIENT", "-toEXI", "-toFile", "HelloWorldProgramOutput.CommandLine.EXIFICIENT.exi"};
System.out.println ("CommandLine " + Arrays.toString(args));
CommandLine.run (args); // run these commands
System.out.println ("===========================================");
X3D scene graph run-time capabilities are interoperable and functionally equivalent for all X3D file encodings and programming-language bindings. Current and planned support is shown in the following table.
| File load and import | ||
X3D XML
encoding .x3d
(implemented using DOM)
|
X3D ClassicVRML
encoding .x3dv
(TODO)
|
X3D VRML97
encoding .wrl
(TODO)
|
Efficient XML Interchange (EXI)
compressed
.exi
(implemented with EXIficient; OpenEXI to follow) |
GZIP-compressed .x3d
(implemented)
|
ZIP-compressed .x3d
(implemented)
|
X3D JSON
encoding .json
(TODO)
|
.stl
and
.ply
geometry import
(TODO)
|
|
| File/stream Export serialization | ||
X3D XML .x3d encoding
(implemented)
|
ClassicVRML .x3dv encoding
(implemented)
|
VRML97 .wrl encoding
(implemented)
|
X3DOM
scene page
X3dom.xhtml
(implemented)
|
X_ITE scene page (formerly Cobweb)
X_ITE.html
(implemented)
|
X3D .json encoding
(implemented)
|
Efficient XML Interchange (EXI)
.exi
(implemented with EXIficient, OpenEXI to follow) |
GZIP
.gz
(implemented)
|
ZIP
.zip
(implemented)
|
X3D Compressed Binary Encoding (CBE)
.x3db
(TODO)
|
Efficient X3D Encoding
.x3de
(proposed)
|
X3DJSAIL
.java source using
X3dToJava.xslt
(implemented)
|
| X3D canonical form (implemented as default output format) | XML Canonicalization (C14N) (TODO) |
Shape Resource Container (SRC)
.src
(no longer planned for X3D v4) |
| XML Signature for authentication (TODO) | XML Encryption for confidential access and privacy (TODO) | |
Conversion capabilities continue to grow through multiple exporters and importers.
Blender is an open-source 3D authoring tool that includes support for X3D import/export (FreeBSD Linux, MacOSX, Windows) (download).
.stl, .x3d, .ply, .obj, .3ds, .wrl VRML97, U3D, COLLADA and others.
System.out.println("Blender default path=" + ConfigurationProperties.getBlenderPath());
BlenderLauncher.checkBlenderPath();
System.out.println("Blender.checkBlenderPath() new path=" + ConfigurationProperties.getBlenderPath());
System.out.println("BlenderLauncher.hasBlender()=" + BlenderLauncher.hasBlender());
System.out.println("Blender version=" + BlenderLauncher.getBlenderVersion());
stylesheets/build.xml target="test.X3DJSAIL"TODO
MeshLab is an open source, portable, and extensible system for the processing and editing of unstructured 3D triangular meshes (Win64, MacOS, Linux Snap) (download).
.stl, .x3d, .ply, .obj, .3ds, .wrl VRML, , and others.
java -classpath someLocalPath/X3DJSAIL.3.3.full.jar org.web3d.x3d.jsail.MeshLabLauncher -help
java -classpath someLocalPath/X3DJSAIL.3.3.full.jar org.web3d.x3d.jsail.MeshLabLauncher -l logfile.txt -i file1.stl -o file2.x3d
System.out.println("MeshLab default path=" + ConfigurationProperties.getMeshLabPath());
meshLabLauncher.checkMeshLabPath();
System.out.println("MeshLab.checkMeshLabPath() new path=" + ConfigurationProperties.getMeshLabPath());
System.out.println( "MeshLabLauncher.hasMeshLab()=" + MeshLabLauncher.hasMeshLab());
System.out.println("MeshLabLauncher.getMeshLabVersion()=" + MeshLabLauncher.getMeshLabVersion());
boolean conversionResult = meshLabLauncher.convertModel(
"C:/x3d-code/www.web3d.org/x3d/stylesheets/java/examples",
"CleatClamp.stl", "CleatClamp.RoundTrip.stl"); // converts ascii to binary
X3DObject importedX3D = MeshLabLauncher.importModel(
"C:/x3d-code/www.web3d.org/x3d/stylesheets/java/examples",
"CleatClamp.stl");
System.out.println("MeshLabLauncher.wasPriorCommandSuccessful()=" + MeshLabLauncher.wasPriorCommandSuccessful());
System.out.println("meshLabLauncher.getPriorMeshLabTraceLogFileName()=" + MeshLabLauncher.getPriorMeshLabTraceLogFilePath());
System.out.print ("meshLabLauncher.getPriorMeshLabTraceLogContents()=" + meshLabLauncher.getPriorMeshLabTraceLogContents());
stylesheets/build.xml target="test.X3DJSAIL"
<echo message="org.web3d.x3d.jsail.MeshLabLauncher -help"/>
<java classname="org.web3d.x3d.jsail.MeshLabLauncher" classpath="${java.jars.dir}/${jsai.full.archive.jar.name};." fork="${fork}">
<arg value="-help"/>
</java>
<echo message="==========================================="/>
<echo message="org.web3d.x3d.jsail.MeshLabLauncher ${java.examples.dir}/CleatClamp.stl ${java.examples.dir}/CleatClamp.MeshLabLauncher.x3d"/>
<java classname="org.web3d.x3d.jsail.MeshLabLauncher" classpath="${java.jars.dir}/${jsai.full.archive.jar.name};." fork="${fork}">
<arg value="${java.examples.dir}/CleatClamp.stl"/> <!-- input model -->
<arg value="${java.examples.dir}/CleatClamp.MeshLabLauncher.x3d"/> <!-- output model -->
</java>
<echo message="==========================================="/>
<echo message="org.web3d.x3d.jsail.MeshLabLauncher ${java.examples.dir}/CleatClamp.stl ${java.examples.dir}/CleatClamp.MeshLabLauncher.stl"/>
<java classname="org.web3d.x3d.jsail.MeshLabLauncher" classpath="${java.jars.dir}/${jsai.full.archive.jar.name};." fork="${fork}">
<arg value="${java.examples.dir}/CleatClamp.stl"/> <!-- input model -->
<arg value="${java.examples.dir}/CleatClamp.MeshLabLauncher.stl"/> <!-- output model -->
</java>
Success metric: the X3D information model is sufficient to support round-trip conversion of any X3D scene from one encoding to another.
org.web3d.x3d.sai Java interfaces so that
author-created source code for Script nodes can be precompiled and later work with a variety of
X3D player implementations.
org.web3d.x3d.jsail package of SAI concrete objects that defines instantiable classes, constants and utility methods.
Complementary design enables standalone X3D Java programming, with no X3D Script node or external HTML browser required.
The following software-architecture principles have influenced codebase design.
org.web3d.x3d.sai.InvalidFieldValueException exception is thrown.
X3DJSAIL can be used in any Java project by including one of the following jar files in the application CLASSPATH.
X3DJSAIL.3.3.full.jar can be unzipped to create a complete local copy of all source, binaries, documentation and example programs.
It is also executable on the
Command Line.
X3DJSAIL.3.3.classes.jar can be used by developers for server-side usage or integration in other applications.
Further CLASSPATH modifications may be needed to to use it.
For full operation, third-party dependency jars found in the
lib subdirectory must also be in the application CLASSPATH.
Examples are shown under
Command Line use.
Initial codebase development is building out features in a single example "smoke test" program for comprehensive testing.
Long-term plans include creation (and possibly autogeneration) of a unit-test suite to always ensure that capabilities and features remain working.
Efficient XML Interchange (EXI) is a World Wide Web Consortium (W3C) Recommendation that provides compact, high-performance compression for XML and JSON files.
|
The OpenEXI introduction whitepaper describes how EXI design produces documents that decompress directly into computer memory, with no parsing of decompressed data required.
EXI file compaction and computational performance have been demonstrated to be superior to a variety other compression schemes including gzip, zip, BSON, CBOR, and other compressed file formats.
DEF, USE and class attributes.
.x3d source models in the
X3D Examples Archive.
IS/connect support,
improve ProtoInstance handling without needing containerField
containerField
values.
ID, IDREF, NMTOKEN and NMTOKENS.
appinfo and documentation fields.
Ensure that specification support for ProtoInstance includes DEF USE IS class and metadata fields.
java.util.logging options as alternatives to strict exception throwing.
Provides
ConfigurationProperties.debugModeActive
initializer and
ConfigurationProperties.setDebugModeActive(boolean),
ConfigurationProperties.isDebugModeActive()
methods to enable verbose debugging output when desired.
EXI_ENGINE_OPENEXI
and
EXI_ENGINE_EXIFICIENT
for selection between implementations
EXIficient (implemented)
and
Nagasena OpenEXI (TODO)
to provide XML-based
Efficient XML Interchange (EXI)
compression.
SF/MF Image and Matrix* classes
(typically adapting source code from the Xj3D implementation).
DEF and name values
when first constructing HAnim nodes.
Include naming checks in each node's self-checking validate() method.
.stl,
.ply and others).
Adding native export to this codebase can likely be adapted to X3D SAI codebases in other programming languages.
Even so, robust conversion support in open-source MeshLab and Blender handles most needs.
import statements within autogenerated library source code.
.class byte code with various X3D players.
validate() testing for special fields requiring a higher-than-default component level, when they occur.
Example: Inline load field. Requires additional information in X3D Unified Object Model.
Utility methods provide additional helpful functionality to X3D Java programmers, going beyond the minimalist required interfaces in the X3D Java SAI specification.
Warning: note that, by default, creating or decompressing files may overwrite prior versions.
See
ConfigurationProperties.isOverwriteExistingFiles()
and
setOverwriteExistingFiles(newValue)
to modify overwrite permissions.
X3DJSAIL.properties.template
and example
X3DJSAIL.properties
ConfigurationProperties.PROPERTIES_FILENAME_DEFAULT,
ConfigurationProperties.getPropertiesFileName(),
ConfigurationProperties.setPropertiesFileName(fileName),
ConfigurationProperties.loadProperties(),
ConfigurationProperties.isNormalizeCommentWhitespace()
X3DObject.loadModelFromFileX3D(fileName),
X3DObject.loadModelFromFileX3D(x3dFile),
X3DObject.replace(newX3DObject)
X3DObject.fromFileEXI(exiFileName)
(using EXIficient; OpenEXI to follow)
X3DObject.fromFileGZIP(gzipFileName)
X3DObject.fromFileZIP(zipFileName, modelFileName)
modelFileName is provided, then the first .x3d model encountered in the zip file is returned (if any).
X3DLoaderObject.loadModelFromFileX3D(fileName),
X3DLoaderObject.loadModelFromFileX3D(x3dFile),
X3DLoaderObject.getValidationResult()
X3DLoaderObject.getDomDocument(),
X3DLoaderObject.getX3dObjectTree()
and other
methods.
File object if successful.
Similar toStringEncoding and toStringLanguage methods are also provided.
|
X3DObject.toFileDocumentationHtml(String filename)
with stylesheets
STYLESHEET_htmlDocumentation,
STYLESHEET_extrusionCrossSectionSVG
X3DObject.toFileX3DOM(String filename)
with stylesheet
STYLESHEET_X3DOM
X3DObject.toFileX_ITE(String sourceSceneName, String filename)
with stylesheet
STYLESHEET_X3DOM
(with parameter settings)
X3DObject.toFileX3dTidy(String filename)
and
X3DObject.toStringX3dTidy()
with stylesheet
STYLESHEET_X3DTIDY
(TODO add parameter settings)
X3DObject.toFileModelMetaMarkdown(String filename)
and
X3DObject.toStringModelMetaMarkdown()
with stylesheet
STYLESHEET_MODEL_META_TO_MARKDOWN
X3DObject.toFileJSON(String filename)
with stylesheet
STYLESHEET_JSON
X3DObject.toFileJava(String filename)
with stylesheet
STYLESHEET_JAVA
ConfigurationProperties.setXsltEngine(String filename)
with
XSLT_ENGINE_saxon
(default) or
XSLT_ENGINE_nativeJava.
createDeclarativeShapeTests().
addChild()
for nodes implementing the
X3DGroupingNode
interface. This is a big help because SAI-specified interfaces for
addChildren()
are required to return void.
.hasAncestorSceneObject() and
.findAncestorSceneObject()
.hasAncestorX3DObject() and
.findAncestorX3DObject(),
findAncestorProtoBody()
and
hasAncestorProtoBody().
findNodeByDEF(DEFvalue),
findElementByNameValue(nameValue),
findElementByNameValue(nameValue, elementName),
findAncestorElementByName(ancestorElementName)
and
hasAncestorElementByName(ancestorElementName).
containerField_DEFAULT to each node, as well as a handful of
containerField_ALTERNATE_VALUES.
Interestingly these values are typically never needed in Java SAI programs (unless someone is writing a low-level XML parser or somesuch).
For more detail:
X3D Scene Authoring Hints: containerField.
ProtoDeclare,
ProtoInterface,
ProtoBody,
ExternProtoDeclare,
ProtoInstance,
IS
and
connect.
fieldObject
and
fieldValueObject.
ROUTE fields using
ROUTEObject.validate()
method.
X3DObject.validate()
to confirm correctness of all attribute and contained-node values.
This feature essentially confirms the strongly typed design and value-range checks already in place.
DEF and USE attributes.
Follow up with related specification issues for abstract SAI and corresponding encoding specifications.
class attribute to Object Model for X3D (OM4X3D).
Follow up with related specification issues for abstract SAI and corresponding encoding specifications.
DEF name for immediate identification when creating a new node.
SFNode and MFNode instantiation.
Add boolean hasSomeFieldName() methods to indicate whether each SFNode/MFNode field contains either strongly typed node(s) or ProtoInstance node(s).
addChildren/clearChildren
/removeChildren/setChildren and related accessor methods.
ArrayList
data structures.
ConfigurationProperties
serialization support for line indent character and indent increment.
addComments() methods for any node or statement, using
CommentsBlock
class.
0xRRGGBB integer colors (through defined constants and utility methods) to
SFColorObject
and related classes.
ROUTE connections, e.g.
OrientationInterpolatorObject.toField_SET_FRACTION
and
OrientationInterpolatorObject.fromField_VALUE_CHANGED.
getFieldType(fieldName) and getAccessType(fieldName)
for each X3DConcreteElement
unit statement
scale factors.
toStringX3D() serialization-output settings support
X3D canonical form,
with
ConfigurationProperties
providing additional settings for showing default attribute=value pairs.
Thus additional
X3D Canonicalization (C14N)
integration is no longer needed.
headObject.getMetaByName(metaName)
getComponentByName(componentName) and getUnitByName(unitName),
ScriptObject.findFieldByName(fieldName) (also for ComposedShaderObject, ShaderPartObject and ShaderProgramObject),
and
ProtoInstanceObject.findFieldValueByName(fieldValueName)
cleanupEnclosingQuotes(singleValue)
and
cleanupEnumerationValue(values).
acceptableNodeTypes restrictions are met for operations on children nodes, such as
ViewpointGroupObject.
IMPORTObject
and
EXPORTObject.
ConfigurationProperties.setValidationExceptionAllowed
to set whether partial results are allowed if validation exception occurs when serializing scene output.
Can be useful technique for debugging,
validationExceptionAllowed_DEFAULT
value is false for strict operation.
X3DConcreteNode.isNode(),
X3DConcreteStatement.isStatement()
and
CommentsBlock.isStatement()
ExtrusionObject
utility methods
isCrossSectionClosed(),
isSpineClosed()
and
toFileSvgCrossSection(fileName)
REGEX
string,
pattern,
validate(),
matches()
and
matches(String value).
SFColorObject.toStringCSS()
and
.toStringHTML()
methods.
ConfigurationProperties.isSFImagePixelOutputHexadecimal()
and
.setSFImagePixelOutputHexadecimal(boolean)
serialization support for
MF/SFImage.toString(),
.toStringHexadecimal()
and
.toStringDecimal().
SFVec3fObject.matchesBboxSizeType(String value).
Updated 13 October 2018.
X3D Java Scene Access Interface Library (X3DJSAIL) deployed release version is available online at
http://www.web3d.org/specifications/java/X3DJSAIL.html
Version-control open source for test programs, results and autogeneration build scripts are available in Sourceforge repository.
Questions, suggestions, additions and comments regarding the X3D Java SAI Library (X3DJSAIL) and X3D Unified Object Model (X3DUOM) design are welcome. Please send them to Don Brutzman (brutzman at nps.edu), John Carlson (yottzumm at gmail.com), and Roy Walmsley (roy.walmsley at ntlworld.com).
Copyright ©2005-2017 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.