Basic HTML version of Foils prepared March 18 1998

Foil 25 Producing Event with EAI

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

VRML97 Example for EAI(This example allows user to play with several parameters of a Cylinder object. It shows how Java can get the handle of a browser object, handle of a node in the world, handle of a eventIn(addChildren)/ eventOut(removeChildren), and add another node to world through EAI.)
First you get the handle of the eventIn field and then whenever you update its value, you will produce event for this sink.
EventInSFVec3f set_translation;
transform = browser.getNode("aNode");
set_translation = (EventInSFVec3f) transform.getEventIn("translation");
float [] val = new float[3];
val[0] = val[1]= val[2]=10.0;
set_translation.setValue(val);
DEF aNode in VRML File
Field in transform node



© 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