List of usage examples for javax.media.j3d SceneGraphObject setUserData
public void setUserData(Object userData)
From source file:PickCollisionTest.java
void recursiveSetUserData(SceneGraphObject root, Object value) { root.setUserData(value); // recursively process group if (root instanceof Group) { Group g = (Group) root; // recurse on child nodes java.util.Enumeration enumKids = g.getAllChildren(); while (enumKids.hasMoreElements() != false) recursiveSetUserData((SceneGraphObject) enumKids.nextElement(), value); }//from w ww . j a v a 2s .co m }
From source file:VrmlPickingTest.java
void recursiveSetUserData(Object value, Object key) { if (value instanceof SceneGraphObject != false) { // set the user data for the item SceneGraphObject sg = (SceneGraphObject) value; sg.setUserData(key); // recursively process group if (sg instanceof Group) { Group g = (Group) sg; // recurse on child nodes java.util.Enumeration enumKids = g.getAllChildren(); while (enumKids.hasMoreElements() != false) recursiveSetUserData(enumKids.nextElement(), key); } else if (sg instanceof Shape3D || sg instanceof Morph) { PickTool.setCapabilities((Node) sg, PickTool.INTERSECT_FULL); }//from w w w . j av a2s . c om } }