|
|
@@ -220,7 +220,18 @@ public class Terrain extends JPanel {
|
|
|
for(DrawEngine object: entities){
|
|
|
//if object selected, scale object
|
|
|
if(object.contains(clickPoint)){
|
|
|
+ double oldscale = object.getScale();
|
|
|
object.setScale(object.getScale() * 1 + (e.getPreciseWheelRotation()/10.0));
|
|
|
+
|
|
|
+ //intersect
|
|
|
+ for(DrawEngine draw: entities){
|
|
|
+ if(draw != object){
|
|
|
+ if(intersection(draw, object)){
|
|
|
+ object.setScale(oldscale);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
repaint();
|
|
|
return;
|
|
|
}
|