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

in Table To:


© 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