/** * Creates a blank BranchGroup with the proper capabilities. */ private static BranchGroup createBranchGroup () { BranchGroup bg = new BranchGroup(); bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ); bg.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE); bg.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); bg.setCapability(BranchGroup.ALLOW_DETACH); bg.setPickable(false); bg.setCollidable(false); return bg; }
/** * Creates a blank BranchGroup with the proper capabilities. */ private static BranchGroup createBranchGroup () { BranchGroup bg = new BranchGroup(); bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ); bg.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE); bg.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); bg.setCapability(BranchGroup.ALLOW_DETACH); bg.setPickable(false); bg.setCollidable(false); return bg; }
public void start() { trajectoire_ = new RotPosPathInterpolator(new Alpha(nbCycles_, temps_), univers_.getTransformGroup(), axe_, pourcentAtIndex_, directions_, positions_); trajectoire_.setSchedulingBounds(new BoundingSphere()); bg_ = new BranchGroup(); bg_.setCapability(BranchGroup.ALLOW_DETACH); bg_.addChild(trajectoire_); univers_.addBranchGraph(bg_); }
private void buildFond(Color3f _c) { if (background_ == null) { background_ = _c == null ? new Background(0F, 0F, 0F) : new Background(_c); background_.setCapability(Background.ALLOW_COLOR_WRITE); background_.setCapability(Background.ALLOW_COLOR_READ); background_.setCapability(Background.ALLOW_APPLICATION_BOUNDS_READ); background_.setCapability(Background.ALLOW_APPLICATION_BOUNDS_WRITE); // background_.setApplicationBounds(new BoundingSphere(new Point3d(0, 0, 0), 1E12)); background_.setBoundsAutoCompute(true); final BranchGroup fond = new BranchGroup(); fond.addChild(background_); fond.setCapability(BranchGroup.ALLOW_DETACH); addBranchGraph(fond); } }
shapeParents[1] = new BranchGroup(); shapeParents[1].setCapability(BranchGroup.ENABLE_PICK_REPORTING); shapeParents[1].setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); childGroup = new BranchGroup(); shapeParents[0] = null; } else { shapeParents[0] = new BranchGroup(); shapeParents[0].setCapability(BranchGroup.ENABLE_PICK_REPORTING); shapeParents[0].setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); childGroup = new BranchGroup();
@Override public void setViewValue(Object o) { // value = o; if (!VGraphicsUtil.NO_3D) { if (shapeGroup != null) { shapeGroup.detach(); } Shape3D shape = (Shape3D) o; shapeGroup = new BranchGroup(); shapeGroup.setCapability(BranchGroup.ENABLE_PICK_REPORTING); shapeGroup.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND); shapeGroup.setCapability(BranchGroup.ALLOW_CHILDREN_READ); shapeGroup.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE); shapeGroup.setCapability(BranchGroup.ALLOW_DETACH); shapeGroup.addChild(shape); universeCreator.getRootGroup().addChild(shapeGroup); getCanvas().postRenderTask(); } }
((BranchGroup) e.nextElement()).detach(); BranchGroup emptyGroup = new BranchGroup(); emptyGroup.setCapability(BranchGroup.ALLOW_DETACH); locale_.addBranchGraph(emptyGroup);
shapeGroup = new BranchGroup(); BranchGroup g = new BranchGroup();
shapeGroups[i] = new BranchGroup(); BranchGroup switchParentGroup = new BranchGroup();
BranchGroup branch = new BranchGroup(); LayoutEventBroadcaster<V,E> elayout = new LayoutEventBroadcaster<V,E>(inLayout); BranchGroup bg = new BranchGroup(); bg.addChild(tg);
public BUnivers(final BCanvas3D _canvas) { canvas_ = _canvas; locale_ = new Locale(this); final ViewPlatform camera = new ViewPlatform(); final BranchGroup viewGroup = new BranchGroup(); final TransformGroup viewTg = new TransformGroup(); viewTg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ); viewTg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); viewTg.setCapability(Node.ALLOW_LOCAL_TO_VWORLD_READ); viewTg.addChild(camera); viewGroup.addChild(viewTg); final PhysicalBody body = new PhysicalBody(); final PhysicalEnvironment env = new PhysicalEnvironment(); final View view = new View(); view.setPhysicalBody(body); view.setPhysicalEnvironment(env); view.setBackClipDistance(100); view.setFrontClipDistance(.1); view.addCanvas3D(canvas_); view.attachViewPlatform(camera); transformU_ = viewTg; position_ = new Vector3d(); viewGroup.setCapability(BranchGroup.ALLOW_DETACH); locale_.addBranchGraph(viewGroup); }
BranchGroup objRoot = new BranchGroup();
public BranchGroup createSceneGraph(final Canvas3D canvas) { objRoot = new BranchGroup(); objRoot.setCapability(Group.ALLOW_CHILDREN_EXTEND); objRoot.setCapability(Group.ALLOW_CHILDREN_WRITE);