http://tecfa.unige.ch/ico/navi/tex2html/top.gifhttp://tecfa.unige.ch/ico/icons/vrml97-icon.gif next up previous contents index
Next: 6.2 The very first Up: 6. The External Authoring Previous: 6. The External Authoring

   
6.1 What can we use the EAI for ?

Let's quote from ``VRML Is- Java Does- And the EAI Can Help'' ([Kimen, 1997]): ``[e]ssentially, to Java, the EAI is a set of classes with methods that can be called to control the VRML world. To VRML the EAI is just another mechanism that can send and receive events, just like the rest of VRML.'' In more general terms, the EAI is an interface specification that allows an external program to communicate with a VRML scene. So in principle the EAI is neither tied to Java nor to a Java applet on the same HTML page, it is just in practise (for now at least). Read Chris Marrin's ``Anatomy of a VRML Browser'' ([Marrin, 1996]) for details on the relationship between the EAI and the rest of VRML.

Again in [Kimen, 1997] Chris Marrin who is the main author of the EAI is quoted with an example that illustrates what the EAI does:

For instance, If Java wants to change the color of a sphere in the VRML world, it would make a call to find the sphere by asking for it by name. Then it would make a call to find the color field of the sphere. Then it would make a call to change the color of that field. In VRML, you can name any node. That is the name the Java applet is asking for. Most nodes can be sent events. When the Java applet finds the color field and changes the color of that field, the VRML world receives an event to change the color, processes that event, and voila, the sphere changes color.

Note that VRML can also talk to the EAI ``on its own initiative'' as we shall learn later. Everything you can do within in script node (e.g. by using Java/VrmlScript or the the Java Scripting Application Interface) you can do with the EAI. However, in many situations it is better to use the Script Interface [more later].

Here are a few typical situations where you need or should use the EAI:


next up previous contents index http://tecfa.unige.ch/ico/navi/tex2html/top.gifhttp://tecfa.unige.ch/ico/icons/vrml97-icon.gif
Next: 6.2 The very first Up: 6. The External Authoring Previous: 6. The External Authoring
D.K.S. - 1998-03-18