Package javax.media.j3d

Examples of javax.media.j3d.Canvas3D

The basic Java 3D monoscopic rendering loop is as follows:

In both cases, the entire loop, beginning with clearing the canvas and ending with swapping the buffers, defines a frame. The application is given the opportunity to render immediate-mode geometry at any of the clearly identified spots in the rendering loop. A user specifies his or her own rendering methods by extending the Canvas3D class and overriding the preRender, postRender, postSwap, and/or renderField methods. Updates to live Geometry, Texture, and ImageComponent objects in the scene graph are not allowed from any of these callback methods.

Serialization

Canvas3D does not support serialization. An attempt to serialize a Canvas3D object will result in an UnsupportedOperationException being thrown.

Additional Information

For more information, see the Introduction to the Java 3D API and View Model documents. @see Screen3D @see View @see GraphicsContext3D


    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here


    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here

        JFrame jf = new JFrame("Welcome");
        JPanel panel = new JPanel();
        panel.setLayout(new GridLayout(1, 1, 2, 2));

        GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
        Canvas3D canvas3D = new Canvas3D(config);
        canvas3D.setSize(360, 160);
        SimpleUniverse universe = new SimpleUniverse(canvas3D);
        BranchGroup group = new BranchGroup();
        addObjects(group);
        addLights(group);
        universe.getViewingPlatform().setNominalViewingTransform();
View Full Code Here

    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here

    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here

  {
    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here

    //Mechanism for closing the window and ending the program.
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    //Default settings for the viewer parameters.
    myCanvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());


    //Construct the SimpleUniverse:
    //First generate it using the Canvas.
    SimpleUniverse simpUniv = new SimpleUniverse(myCanvas3D);
View Full Code Here

        // Lastly drop the canvas in the frame.
        if (_canvas != null) {
            _container.remove(_canvas);
        }

        _canvas = new Canvas3D(config);

        _container.add("Center", _canvas);
        _canvas.setSize(new Dimension(horizontalDimension, verticalDimension));
        _simpleUniverse = new SimpleUniverse(_canvas);
        _simpleUniverse.getViewingPlatform().setNominalViewingTransform();
View Full Code Here

        super._createViewScreen();

        GraphicsConfiguration config = SimpleUniverse
                .getPreferredConfiguration();

        _offScreenCanvas = new Canvas3D(config, true);
        _offScreenCanvas.getScreen3D().setSize(_canvas.getScreen3D().getSize());
        _offScreenCanvas.getScreen3D().setPhysicalScreenWidth(
                _canvas.getScreen3D().getPhysicalScreenWidth());
        _offScreenCanvas.getScreen3D().setPhysicalScreenHeight(
                _canvas.getScreen3D().getPhysicalScreenHeight());
View Full Code Here

    this.fentreLancement.dispose();
  }
 
  public void init(EcouteurClavier clavier){
    this.render = new PanelConduite();
    Canvas3D c3d = this.render.init();
    this.vue3D = new Vue3D(c3d);
    JFrame fenetreRender = new JFrame("Render");
    fenetreRender.add(render);
    fenetreRender.setVisible(true);
    fenetreRender.pack();
View Full Code Here

TOP

Related Classes of javax.media.j3d.Canvas3D

Copyright © 2018 www.massapicom. 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.