Basic HTML version of Foils prepared March 18 1998

Foil 20 Getting Handle of Another Node in Script Node with Java

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


1 DEF SomeNode Transform {} # A transform node (flush out!)
2 Script { # A Script node
3 field SFNode node USE SomeNode # SomeNode is a Transform node
4 eventIn SFVec3f pos # new value to be inserted in
5 # SomeNode's translation field
6 url "Example3.class"
7 }
8 # while Example3.class is:
9 public class ExampleGetAnotherNode extends Script {
10 private SFNode node; // field
11 public void initialize()
12 { node = (SFNode) getField("node"); }
13 }
14 It is possible to access any field of the node object.

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 Apr 5 1998