예제 #1
0
  @Override
  public void install(Controller c) throws Exception {
    super.install(c);

    // scene
    Scene scene = c.getPlugin(Scene.class);
    scene.getBackdropComponent().addChild(terrain);
    scene.setAutomaticClippingPlanes(false);

    viewPreferences = c.getPlugin(ViewPreferences.class);
    viewPreferences.addColorPickerChangedListener(this);
    faceColorChooser.getColorPanel().setMode(viewPreferences.getColorPickerMode());

    textureInspector.setAppearance(appearance);
    updateFaceColor();
    updateFacesReflecting();
    updateFaceReflection();
    updateTransparencyEnabled();
    updateTransparency();
    VRPanel vp = c.getPlugin(VRPanel.class);
    vp.addComponent(getClass(), shrinkPanel, 1.0, "VR");
  }
예제 #2
0
 @Override
 public void install(Controller c) throws Exception {
   super.install(c);
   viewMenuBar = c.getPlugin(ViewMenuBar.class);
   View view = c.getPlugin(View.class);
   ViewerSwitch viewer = view.getViewer();
   Component parent = viewer.getViewingComponent();
   exportMenu.setIcon(ImageHook.getIcon("disk.png"));
   exportMenu.add(new ExportImage("Image", viewer, parent));
   exportMenu.add(new ExportScreenshot("Screenshot", viewer, parent));
   exportMenu.add(new ExportRIB("RIB", viewer, parent));
   exportMenu.add(new ExportSVG("SVG", viewer, parent));
   exportMenu.add(new ExportPS("PS", viewer, parent));
   exportMenu.add(new ExportVRML("VRML", viewer, parent));
   exportMenu.add(new ExportSTL("STL", viewer, parent));
   exportMenu.add(new ExportOBJ("OBJ", viewer, parent));
   exportMenu.add(new ExportU3D("U3D", viewer, parent));
   exportMenu.add(exportPDF = new ExportPDF("PDF", viewer, parent));
   exportMenu.add(new SunflowMenu(viewer));
   SaveScene saveSceneAction = new SaveScene("Save Scene", viewer, parent);
   saveSceneAction.setIcon(ImageHook.getIcon("disk.png"));
   viewMenuBar.addMenuItem(getClass(), 1, saveSceneAction, "File");
   viewMenuBar.addMenuItem(getClass(), 2, exportMenu, "File");
 }