Integration of java and vrml

M. Creon Levit ([email protected])
Thu, 1 Jun 1995 18:37:41 -0700


Just and idea....

Here is an outline for integrating java and vrml in a simple, phased
manner. The implementation of each phase would result in useful
software, and each phase build progressively on the previous ones.

1. Write a browser (or bidirectionally coupled browser/external
viewer pair like webspace) that can understand both java and vrml, as
separate languages with their own disjoint semantics and their own,
disjoint windows for displaying their respective data.

2. Add java-callable bindings for vrml 1.0 (like the c++ bindings for
inventor). Allow the browser, when interpreting java code that calls
vrml, to render in and focus on the vrml window. This allows the
browser to build, draw, and browse vrml worlds described by java
programs (eg. applets) loaded in as part of their containing html
pages).

3. Extend the vrml WWWAnchor node (or make a new vrml node) so that
it can specify what the html+java <app> tag does. This will require
some new fields (arbitrary ones, actually). However, unlike <app>
tags in java documents, in this WWWAnchor case, the java applet should
not be loaded and run immediately, but rather, as one would expect,
loaded and run only when one of the WWWAnchor's children is chosen.

(the vrml 1.0 spec doesn't say much about what happens when the
"arbitrary URL" gets loaded by choosing WWWAnchor. What is its a jpeg
url...).

4. Extend the vrml WWWInline node similarly, but it *would* behave
like the <app> tag. Whenever the scene containing it was loaded, the
applet specified would initialize and run in its own thread.

(remember, of course, that these applets can be defining and modifying
the current scene graph, computing things, etc. It is arguable that,
at this point, however, they don't get to respond to mouse events in
the vrml window).

At this point we have a pretty powerful system.

5. Extend vrml+java to include some of the remainder of inventor,
especially callbacks (and selecting and picking).

6. Add the bulk of the remainder of inventor to vrml.

Now perhaps all this has been discussed before (I lurked and did not
find). Or perhaps it is already happening behind closed doors at
SGI, SUN, EIT, or in the standard effort. I just thought I would
share a few thoughts.