示例#1
0
 private void selectFocus() {
   Point3D p = new Point3D(0, 0, 0);
   Nucleotide n =
       selectionModel
           .getItems()[
           selectionModel
               .getSelectedIndices()
               .get(selectionModel.getSelectedIndices().size() - 1)];
   p = p.add(utils.fx3d.computeCenter(n.getNucleotideCoordinates()));
   p = p.add(utils.fx3d.computeCenter(n.getBaseCoordinates()));
   p = p.multiply(1 / ((double) 2));
   // fx3d.transiteFromTOo(tertiaryRoom.getCamera(), p);
   tertiaryRoom.setCameraCenter(p);
 }
示例#2
0
 private void initSelectionListener() {
   selectionFocusListener =
       c -> {
         if (selectionModel.getSelectedItems().isEmpty())
           tertiaryRoom.setCameraCenter(rnaSequence3D.computeCenter());
         if (selectionModel.getSelectedIndices().size() > 0) selectFocus();
       };
 }