Ejemplo n.º 1
0
 @Override
 public void applyGeometryTransform(Transform transform) {
   for (Coord3d c : coordinates) {
     c.set(transform.compute(c));
   }
   updateBounds();
 }
 @Override
 public int compare(Coord3d o1, Coord3d o2) {
   if (o1.equals(o2)) return 0;
   else {
     double d1 = camera.getEye().distance(o1);
     double d2 = camera.getEye().distance(o2);
     if (d1 < d2) return 1;
     else return -1;
   }
 }
  protected void pan(Coord3d from, Coord3d to) {
    Chart chart = targets.get(0);

    BoundingBox3d viewBounds = chart.getView().getBounds();
    Coord3d offset = to.sub(from).div(-PAN_FACTOR);
    BoundingBox3d newBounds = viewBounds.shift(offset);
    chart.getView().setBoundManual(newBounds);
    chart.getView().shoot();

    fireControllerEvent(ControllerType.PAN, offset);
  }