@ -1017,12 +1017,13 @@ public enum BuildingManager {
@@ -1017,12 +1017,13 @@ public enum BuildingManager {
Point2D . Float p4 = new Point2D . Float ( bottomLeft . x , bottomLeft . z ) ;
float rectWidth = topLeft . distance ( topRight ) ;
float rectHeight = topLeft . distance ( bottomLeft ) ;
boundingBox . setRect ( p1 . x , p1 . y , rectWidth , rectHeight ) ;
generatedMesh . boundsRect = new Rectangle2D . Float ( ) ;
generatedMesh . boundsRect . setRect ( p1 . x , p1 . y , rectWidth , rectHeight ) ;
generatedMesh . BoundingLines . add ( new Line2D . Float ( p1 , p2 ) ) ;
generatedMesh . BoundingLines . add ( new Line2D . Float ( p2 , p3 ) ) ;
generatedMesh . BoundingLines . add ( new Line2D . Float ( p3 , p4 ) ) ;
generatedMesh . BoundingLines . add ( new Line2D . Float ( p4 , p1 ) ) ;
generatedMesh . boundsRect = boundingBox ;
//generatedMesh.boundsRect = boundingBox;
} else {
Logger . error ( "No Bounding Box Data For Mesh: " + mesh ) ;
}
@ -1049,13 +1050,14 @@ public enum BuildingManager {
@@ -1049,13 +1050,14 @@ public enum BuildingManager {
}
building . buildingMeshes . add ( generatedMesh ) ;
}
Rectangle2D . Float buildingBound = new Rectangle2D . Float ( ) ;
//Rectangle2D.Float buildingBound = new Rectangle2D.Float();
float xLoc = building . loc . x - building . getBounds ( ) . getHalfExtents ( ) . x ;
float zLoc = building . loc . z - building . getBounds ( ) . getHalfExtents ( ) . y ;
float width = building . getBounds ( ) . getHalfExtents ( ) . x * 2 ;
float height = building . getBounds ( ) . getHalfExtents ( ) . y * 2 ;
buildingBound . setRect ( xLoc , zLoc , width , height ) ;
building . buildingRect = buildingBound ;
building . buildingRect = new Rectangle2D . Float ( ) ;
building . buildingRect . setRect ( xLoc , zLoc , width , height ) ;
//building.buildingRect = buildingBound;
}
catch ( Exception e ) {
Logger . info ( "Failed To Bake Building Mesh Data For Structure: " + building . meshUUID ) ;