Package javax.media.j3d

Examples of javax.media.j3d.GraphicsConfigTemplate3D



  private Component3DManager() {
    if (!GraphicsEnvironment.isHeadless()) {
      // Retrieve graphics configuration once
      GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
      // Try to get antialiasing
      template.setSceneAntialiasing(GraphicsConfigTemplate3D.PREFERRED);
     
      // From http://www.java.net/node/683852
      // Check if the user has set the Java 3D stereo option.
      String stereo = System.getProperty("j3d.stereo");
      if (stereo != null) {
        if ("REQUIRED".equals(stereo))
          template.setStereo(GraphicsConfigTemplate.REQUIRED);
        else if ("PREFERRED".equals(stereo))
          template.setStereo(GraphicsConfigTemplate.PREFERRED);
      }
     
      this.configuration = GraphicsEnvironment.getLocalGraphicsEnvironment().
              getDefaultScreenDevice().getBestConfiguration(template);
      if (this.configuration == null) {
        this.configuration = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getBestConfiguration(new GraphicsConfigTemplate3D());
      }
    } else {
      this.offScreenImageSupported = Boolean.FALSE;
    }
  }
View Full Code Here


    this.home = home;
    this.displayShadowOnFloor = displayShadowOnFloor;
    this.object3dFactory = object3DFactory;

    if (Boolean.valueOf(System.getProperty("com.eteks.sweethome3d.j3d.useOffScreen3DView", "false"))) {
      GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
      gc.setSceneAntialiasing(GraphicsConfigTemplate3D.PREFERRED);
      this.component3D = new JCanvas3D(gc) {
          public void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.drawImage(navigationPanelImage, 0, 0, this);
          }
View Full Code Here

/* 356 */     this.locale.addBranchGraph(bg);
/*     */   }
/*     */
/*     */   public static GraphicsConfiguration getPreferredConfiguration()
/*     */   {
/* 368 */     GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
/*     */
/* 375 */     String stereo = (String)AccessController.doPrivileged(new PrivilegedAction()
/*     */     {
/*     */       public Object run() {
/* 378 */         return System.getProperty("j3d.stereo");
/*     */       }
/*     */     });
/* 383 */     if (stereo != null) {
/* 384 */       if (stereo.equals("REQUIRED"))
/* 385 */         template.setStereo(1);
/* 386 */       else if (stereo.equals("PREFERRED")) {
/* 387 */         template.setStereo(2);
/*     */       }
/*     */     }
/*     */
/* 391 */     return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(template);
/*     */   }
View Full Code Here

TOP

Related Classes of javax.media.j3d.GraphicsConfigTemplate3D

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.