Package com.sun.j3d.utils.universe

Examples of com.sun.j3d.utils.universe.SimpleUniverse.addBranchGraph()


    if (listenToHomeUpdates) {
      addCameraListeners(view, viewPlatformTransform);
    }
   
    // Link scene matching home to universe
    universe.addBranchGraph(createSceneTree(
        displayShadowOnFloor, listenToHomeUpdates, waitForLoading));
   
    return universe;
  }
 
View Full Code Here


    //Use parallel instead of perspective projection
    //simpUniv.getViewer().getView().setProjectionPolicy(View.PARALLEL_PROJECTION);


    //Add the objects in the scene.
    simpUniv.addBranchGraph(theScene);


    //To make it look nicer, a little bit of light is recommended.
    addLight(simpUniv);
View Full Code Here

        SimpleUniverse universe = new SimpleUniverse(canvas3D);
        BranchGroup group = new BranchGroup();
        addObjects(group);
        addLights(group);
        universe.getViewingPlatform().setNominalViewingTransform();
        universe.addBranchGraph(group);
        panel.add(canvas3D);
        jf.getContentPane().add(panel, BorderLayout.CENTER);
        jf.pack();
        jf.setVisible(true);
    }
View Full Code Here

    // This will move the ViewPlatform back a bit so the
    // objects in the scene can be viewed.
    u.getViewingPlatform().setNominalViewingTransform();

    u.addBranchGraph(scene);
  }
 
  public Layout<V,E> getGraphLayout() {
    return layout;
  }
View Full Code Here

        addNavigators();

        root.addChild(universe.getUniverse3D().getUniverseRoot());

        root.compile();
        simpleU.addBranchGraph(root);

        synchronizer = new BasicMainSynchronizer(state.getSynchronizer(), universe);

        setAxisShowing(state.isAxisShowing());
        setFpsShowing(state.isFpsShowing());
View Full Code Here

        addNavigators();

        root.addChild(universe.getUniverse3D().getUniverseRoot());

        root.compile();
        simpleU.addBranchGraph(root);
        setAxisShowing(state.isAxisShowing());
    }

    @Override
    public SimLifeCanvas3D getCanvas3D() {
View Full Code Here

    panel.add(BorderLayout.CENTER, canvas);
    SimpleUniverse universe = new SimpleUniverse(canvas);
    // This will move the ViewPlatform back a bit so the
    // objects in the scene can be viewed.
    universe.getViewingPlatform().setNominalViewingTransform();
    universe.addBranchGraph(scene);
   
        ViewingPlatform viewingPlatform = universe.getViewingPlatform();
        viewingPlatform.setNominalViewingTransform();
        // add orbit behavior to ViewingPlatform
        OrbitBehavior   orbit = new OrbitBehavior(canvas, OrbitBehavior.REVERSE_ALL |
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.