Example #1
0
 /** Rotate nodes. */
 @Override
 protected void transformNodes() {
   for (Node n : nodes) {
     double cosPhi = Math.cos(rotationAngle);
     double sinPhi = Math.sin(rotationAngle);
     EastNorth oldEastNorth = oldStates.get(n).getEastNorth();
     double x = oldEastNorth.east() - pivot.east();
     double y = oldEastNorth.north() - pivot.north();
     double nx = cosPhi * x + sinPhi * y + pivot.east();
     double ny = -sinPhi * x + cosPhi * y + pivot.north();
     n.setEastNorth(new EastNorth(nx, ny));
   }
 }