|
|
|
@ -18,10 +18,15 @@ import engine.math.Vector3fImmutable;
@@ -18,10 +18,15 @@ import engine.math.Vector3fImmutable;
|
|
|
|
|
import engine.objects.*; |
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.geom.AffineTransform; |
|
|
|
|
import java.awt.geom.Area; |
|
|
|
|
import java.awt.geom.Path2D; |
|
|
|
|
import java.awt.geom.Rectangle2D; |
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
|
|
|
|
|
import static java.awt.geom.Path2D.WIND_EVEN_ODD; |
|
|
|
|
import static java.awt.geom.Path2D.WIND_NON_ZERO; |
|
|
|
|
|
|
|
|
|
public class RegionCmd extends AbstractDevCmd { |
|
|
|
|
|
|
|
|
|
public RegionCmd() { |
|
|
|
@ -67,7 +72,7 @@ public class RegionCmd extends AbstractDevCmd {
@@ -67,7 +72,7 @@ public class RegionCmd extends AbstractDevCmd {
|
|
|
|
|
boolean pointBlocked = false; |
|
|
|
|
for(Path2D.Float area : building.meshes){ |
|
|
|
|
Vector3fImmutable pos = ((AbstractCharacter)target).loc; |
|
|
|
|
if(area.contains(pos.x, pos.z)){ |
|
|
|
|
if(area.contains(new Point((int) pos.x, (int) pos.z))){ |
|
|
|
|
pointBlocked = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|