shape
This commit is contained in:
@@ -18,10 +18,15 @@ import engine.math.Vector3fImmutable;
|
|||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.geom.Area;
|
import java.awt.geom.Area;
|
||||||
import java.awt.geom.Path2D;
|
import java.awt.geom.Path2D;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.lang.reflect.Field;
|
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 class RegionCmd extends AbstractDevCmd {
|
||||||
|
|
||||||
public RegionCmd() {
|
public RegionCmd() {
|
||||||
@@ -67,7 +72,7 @@ public class RegionCmd extends AbstractDevCmd {
|
|||||||
boolean pointBlocked = false;
|
boolean pointBlocked = false;
|
||||||
for(Path2D.Float area : building.meshes){
|
for(Path2D.Float area : building.meshes){
|
||||||
Vector3fImmutable pos = ((AbstractCharacter)target).loc;
|
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;
|
pointBlocked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -984,6 +984,10 @@ public enum BuildingManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(building.meshUUID == 24000){
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (ArrayList<Vector2f> meshEntry : convexHullList) {
|
for (ArrayList<Vector2f> meshEntry : convexHullList) {
|
||||||
Path2D.Float meshBound = new Path2D.Float();
|
Path2D.Float meshBound = new Path2D.Float();
|
||||||
Vector3fImmutable start = Vector3fImmutable.rotateAroundPoint(new Vector3fImmutable(meshEntry.get(0).x,building.loc.y,meshEntry.get(0).y),building.loc,building.getRot().getRotation());
|
Vector3fImmutable start = Vector3fImmutable.rotateAroundPoint(new Vector3fImmutable(meshEntry.get(0).x,building.loc.y,meshEntry.get(0).y),building.loc,building.getRot().getRotation());
|
||||||
|
|||||||
Reference in New Issue
Block a user