int xdiff = wps[i].getX()-anchorPos.getX();
int ydiff = wps[i].getY()-anchorPos.getY();
wps[i].setX((int)(anchorPos.getX()+xdiff*Math.cos(Math.PI/4.0)+ydiff*Math.sin(Math.PI/4.0)));
wps[i].setY((int)(anchorPos.getY()-xdiff*Math.sin(Math.PI/4.0)+ydiff*Math.cos(Math.PI/4.0)));
}
ptrSMO.recalcBoundingBox();
}
}
}
} else if (source instanceof CustomToggleButton){
//currentType = (PhysicalEntity)((CustomToggleButton)source).getUserObject();