List of usage examples for javax.media.j3d TransformGroup getAllChildren
public Enumeration<Node> getAllChildren()
From source file:ffx.potential.MolecularAssembly.java
private void recurseVRML(Node node) { if (node instanceof Shape3D) { Shape3D s3d = (Shape3D) node; PickTool.setCapabilities(s3d, PickTool.INTERSECT_COORD); return;//from w ww. j a v a 2 s .c om } else if (node instanceof SharedGroup) { SharedGroup sg = (SharedGroup) node; for (Enumeration e = sg.getAllChildren(); e.hasMoreElements();) { recurseVRML((Node) e.nextElement()); } return; } else if (node instanceof BranchGroup) { BranchGroup bg = (BranchGroup) node; for (Enumeration e = bg.getAllChildren(); e.hasMoreElements();) { recurseVRML((Node) e.nextElement()); } return; } else if (node instanceof TransformGroup) { TransformGroup vrmlTG1 = (TransformGroup) node; for (Enumeration e = vrmlTG1.getAllChildren(); e.hasMoreElements();) { node = (Node) e.nextElement(); recurseVRML(node); } return; } else if (node instanceof Link) { Link link = (Link) node; recurseVRML(link.getSharedGroup()); return; } else if (node instanceof Group) { Group group = (Group) node; for (Enumeration e = group.getAllChildren(); e.hasMoreElements();) { Node n = (Node) e.nextElement(); recurseVRML(n); } } else { return; } }