예제 #1
0
 public void loadDetector(String detector) {
   if (detector.compareTo("FTOF") == 0) {
     MeshStore store = GeometryLoader.getGeometryGemc();
     for (Map.Entry<String, MeshView> item : store.getMap().entrySet()) {
       // item.getValue().setMaterial(mat);
       root.getChildren().add(item.getValue());
     }
   }
 }
예제 #2
0
  public void addDetector(String name) {

    TreeItem<String> clasROOT = new TreeItem<String>("CLAS12");

    this.treeView.setEditable(true);
    this.treeView.setCellFactory(CheckBoxTreeCell.<String>forTreeView());
    for (int sector = 1; sector <= 6; sector++) {
      MeshStore store = GeometryLoader.getGeometry("FTOF", sector, 1);
      store.setMaterial(0.6, 0.2, 0.2, 0.4);
      this.meshStores.put(store.getName(), store);
      // treeView = new TreeView<String>();
      // this.treeView.setRoot(store.getMeshTree());
      clasROOT.getChildren().add(store.getMeshTree());
      for (Map.Entry<String, MeshView> entry : store.getMap().entrySet()) {
        root.getChildren().add(entry.getValue());
      }
    }

    for (int sector = 1; sector <= 6; sector++) {
      MeshStore store = GeometryLoader.getGeometry("FTOF", sector, 2);
      store.setMaterial(0.1, 0.1, 0.4, 0.4);
      this.meshStores.put(store.getName(), store);
      // treeView = new TreeView<String>();
      clasROOT.getChildren().add(store.getMeshTree());
      for (Map.Entry<String, MeshView> entry : store.getMap().entrySet()) {
        root.getChildren().add(entry.getValue());
      }
    }

    for (int sector = 1; sector <= 6; sector++) {
      MeshStore store = GeometryLoader.getGeometry("FTOF", sector, 3);
      // store.setVisible(false);

      store.setMaterial(0.1, 0.4, 0.1, 0.4);
      this.meshStores.put(store.getName(), store);
      // treeView = new TreeView<String>();
      clasROOT.getChildren().add(store.getMeshTree());
      for (Map.Entry<String, MeshView> entry : store.getMap().entrySet()) {
        root.getChildren().add(entry.getValue());
      }
    }

    this.treeView.setRoot(clasROOT);
  }
예제 #3
0
 public void testFTOF() {
   PhongMaterial mat = new PhongMaterial();
   mat.setDiffuseColor(new Color(0.1, 0.1, 0.8, 0.5));
   mat.setSpecularColor(new Color(0.1, 0.1, 0.8, 0.5));
   MeshStore store = GeometryLoader.getGeometryGemc();
   for (Map.Entry<String, MeshView> item : store.getMap().entrySet()) {
     // item.getValue().setMaterial(mat);
     root.getChildren().add(item.getValue());
   }
 }