use of javax.media.j3d.SharedGroup in project ffx by mjschnie.
the class MolecularAssembly method recurseVRML.
private void recurseVRML(Node node) {
if (node instanceof Shape3D) {
Shape3D s3d = (Shape3D) node;
PickTool.setCapabilities(s3d, PickTool.INTERSECT_COORD);
return;
} else if (node instanceof SharedGroup) {
SharedGroup sg = (SharedGroup) node;
for (Enumeration<Node> e = sg.getAllChildren(); e.hasMoreElements(); ) {
recurseVRML(e.nextElement());
}
return;
} else if (node instanceof BranchGroup) {
BranchGroup bg = (BranchGroup) node;
for (Enumeration<Node> e = bg.getAllChildren(); e.hasMoreElements(); ) {
recurseVRML(e.nextElement());
}
return;
} else if (node instanceof TransformGroup) {
TransformGroup vrmlTG1 = (TransformGroup) node;
for (Enumeration<Node> e = vrmlTG1.getAllChildren(); e.hasMoreElements(); ) {
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<Node> e = group.getAllChildren(); e.hasMoreElements(); ) {
Node n = e.nextElement();
recurseVRML(n);
}
}
}
Aggregations