Basic HTML version of Foils prepared March 18 1998

Foil 26 Registering for incoming events with EAI

From Scripting and EAI in VRML97 CPS616 -- Information Track of CPS -- Spring Semester 98. by Hasan Ozdemir (Geoffrey C. Fox)


By creating an implementation of EventOutObserver( callback()) interface and passing the reference (advise()) of the appropriate object to the eventOut object, you can collect the incoming events.
public class ExampleEventCollector implements EventOutObserver {
public void start() {
translation_changed = (EventOutSFVec3f)transform.getEventOut("translation");
translation_changed.advise(this,null);
}
public void callback(EventOut event, double time, Object userData) { }
}



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998