1 | First you get the handle of the eventIn field and then whenever you update its value, you will produce event for this sink. |
2 | |
3 | EventInSFVec3f set_translation; |
4 | |
5 | transform = browser.getNode("aNode"); |
6 | set_translation = (EventInSFVec3f) transform.getEventIn("translation"); |
7 | float [] val = new float[3]; |
8 | val[0] = val[1]= val[2]=10.0; |
9 | set_translation.setValue(val); |
10 | DEF aNode in VRML File |
11 | Field in transform node |