Example #1
0
 private void loadOneModel(int model) {
   switch (model) {
     case 0:
       rnaSequence3D.addModel(new StickModel());
       break;
     case 1:
       rnaSequence3D.addModel(new MeshModel());
       break;
     case 2:
       rnaSequence3D.addModel(new BallModel());
       break;
   }
   tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(0));
 }
Example #2
0
  private void loadAllmodels() {
    rnaSequence3D.addModel(new StickModel());
    rnaSequence3D.addModel(new MeshModel());
    rnaSequence3D.addModel(new BallModel());

    structureStick.selectedProperty().unbind();
    structureMesh.selectedProperty().unbind();
    structureBall.selectedProperty().unbind();

    rnaSequence3D.getModels().get(0).visibleProperty().bind(structureStick.selectedProperty());
    rnaSequence3D.getModels().get(1).visibleProperty().bind(structureMesh.selectedProperty());
    rnaSequence3D.getModels().get(2).visibleProperty().bind(structureBall.selectedProperty());

    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(0));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(1));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(2));
  }