|
|
|
@ -984,16 +984,17 @@ public enum BuildingManager {
@@ -984,16 +984,17 @@ public enum BuildingManager {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(building.meshUUID == 24000){ |
|
|
|
|
int i = 0; |
|
|
|
|
} |
|
|
|
|
for (ArrayList<Vector2f> meshEntry : convexHullList) { |
|
|
|
|
Polygon poly = new Polygon(); |
|
|
|
|
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()); |
|
|
|
|
meshBound.moveTo(start.x,start.z); |
|
|
|
|
for (Vector2f vect : meshEntry) { |
|
|
|
|
Vector3fImmutable rotationPoint = Vector3fImmutable.rotateAroundPoint(new Vector3fImmutable(vect.x + building.loc.x, 0, vect.y + building.loc.z), building.loc, building.getRot().getRotation()); |
|
|
|
|
poly.addPoint((int) rotationPoint.x, (int) rotationPoint.z); |
|
|
|
|
Vector3fImmutable pos = Vector3fImmutable.rotateAroundPoint(new Vector3fImmutable(vect.x,building.loc.y,vect.y),building.loc,building.getRot().getRotation()); |
|
|
|
|
meshBound.lineTo(pos.x,pos.z); |
|
|
|
|
} |
|
|
|
|
building.meshes.add(new Area(poly)); |
|
|
|
|
meshBound.lineTo(start.x,start.z); |
|
|
|
|
meshBound.closePath(); |
|
|
|
|
building.meshes.add(meshBound); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|