| Working
Groups
External Authoring Interface (EAI) |
104 |
|
import vrml.external.field.*; import vrml.external.exception.*; public class appletEAI extends Applet implements Runnable, EventOutObserver{
Node defprox; EventOutSFVec3f position; float[] newposition; browser = null; while (browser == null){ browser = Browser.getBrowser(this); try{Thread.sleep(1000); }catch(InterruptedException ie){} } try { defprox = browser.getNode("DefProx"); } catch (InvalidNodeException e) { } try { position = (EventOutSFVec3f) defprox.getEventOut("position_changed"); }catch(InterruptedException ie){} Object data=null;
public void callback(EventOut eo, double
timestamp, Object userData)
String pos0 = ;
showStatus("Nueva posición: "+
strposition);
|
<APPLET CODE="appletEAI.class" NAME="appletEAI" width="1" height="1"
MAYSCRIPT></APPLET>
<EMBED src="eai-vrml2.wrl" align="baseline" border="0" width="300"
height="300" name="vrml">
| |