Basic HTML version of Foils prepared March 18 1998

Foil 24 Getting Handle of a node 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.)
By using the name you gave in the DEF, you can get the handle of particular node with the help of Browser object.
// Get handle to the ROOT Node where there is a DEF ROOT in VRML file
try
{ root = browser.getNode("ROOT");
System.out.println("Got the ROOT node: " + root);
} catch (InvalidNodeException e)
{ System.out.println("PROBLEMS!: " + e);}



© 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