/** * @deprecated The octree methods will be outsourced into a different plugin. */ @Deprecated public void removeOctree() { if (octree != null) { this.removeUniverseListener(octree); scene.removeChild(octree.getRootBranchGroup()); octree = null; } }
/** * Remove the Content with the specified name from the universe. * * @param name */ public void removeContent(final String name) { synchronized (lock) { final Content content = contents.get(name); if (content == null) return; scene.removeChild(content); contents.remove(name); if (selected == content) clearSelection(); fireContentRemoved(content); this.removeUniverseListener(content); updateTimeline(); } }
avatarRoot.removeChild(avatarPosition);
/** * @deprecated This method should not be used any more from outside this * class. Use addInteractiveBehavior() instead. */ @Deprecated public void setInteractiveBehavior(final InteractiveBehavior b) { if (mouseBehavior != null) scene.removeChild(mouseBehavior.getParent()); mouseBehavior = b; mouseBehavior.setSchedulingBounds(bounds); final BranchGroup bg = new BranchGroup(); bg.setCapability(BranchGroup.ALLOW_DETACH); bg.addChild(mouseBehavior); scene.addChild(bg); }
platformGeometryRoot.removeChild(0);
/** * Removes the specified ViewPlatformBehavior */ void removeViewPlatformBehavior(ViewPlatformBehavior behavior) { // remove from the behaviors branch group if (behaviors != null) { behaviors.detach(); for (int i = 0; i < behaviors.numChildren(); i++) { if (behaviors.getChild(i) == behavior) { behavior.setViewingPlatform( null ); behaviors.removeChild(i); break; } } if (behaviors.numChildren() == 0) behaviors = null; else this.addChild(behaviors); } }
public void displayCase(Image3DUniverse univ, int caseNo) { System.out.println("Case no " + caseNo); int threshold = 120; BranchGroup scene = univ.getScene(); for(int i = scene.numChildren()-1; i >= 1 ; i--) { if (scene.getChild(i) instanceof BranchGroup) if (scene.getChild(i).getCapability(BranchGroup.ALLOW_DETACH)) scene.removeChild(i); } System.out.println("Nr. of contents:" + univ.getContents().size()); univ.removeAllContents(); createCase(caseNo); Volume volume = new Volume(image); List l = MCCube.getTriangles(volume, threshold); univ.addTriangleMesh(l, RED, "case" + caseNo); for(int z = 0; z < data.length; z++) { for(int y = 0; y < 2; y++) { for(int x = 0; x < 2; x++) { if(((int)data[z][y*2+x]&0xff)>=threshold) { addVertex(univ, RED, x, y, z); } else { addVertex(univ, GREY, x, y, z); } } } } }