|
@@ -186,9 +186,9 @@ public class SkyLinePacking {
|
|
|
// 生成PlaceItem对象
|
|
|
PlaceItem placeItem;
|
|
|
if (!isRotate) {
|
|
|
- placeItem = new PlaceItem(item.getId(), skyLine.getX(), skyLine.getY(), item.getWidth(), item.getLength(), isRotate);
|
|
|
+ placeItem = new PlaceItem(item.getId(), skyLine.getX(), skyLine.getY(), item.getLength(), item.getWidth(), false);
|
|
|
} else {
|
|
|
- placeItem = new PlaceItem(item.getId(), skyLine.getX(), skyLine.getY(), item.getLength(), item.getWidth(), isRotate);
|
|
|
+ placeItem = new PlaceItem(item.getId(), skyLine.getX(), skyLine.getY(), item.getWidth(), item.getLength(), true);
|
|
|
}
|
|
|
// 将新天际线加入队列
|
|
|
addSkyLineInQueue(skyLine.getX(), skyLine.getY() + placeItem.getLength(), placeItem.getWidth());
|
|
@@ -209,9 +209,9 @@ public class SkyLinePacking {
|
|
|
// 生成PlaceItem对象
|
|
|
PlaceItem placeItem;
|
|
|
if (!isRotate) {
|
|
|
- placeItem = new PlaceItem(item.getId(), skyLine.getX() + skyLine.getLength() - item.getWidth(), skyLine.getY(), item.getWidth(), item.getLength(), isRotate);
|
|
|
+ placeItem = new PlaceItem(item.getId(), skyLine.getX() + skyLine.getLength() - item.getWidth(), skyLine.getY(), item.getLength(), item.getWidth(), false);
|
|
|
} else {
|
|
|
- placeItem = new PlaceItem(item.getId(), skyLine.getX() + skyLine.getLength() - item.getLength(), skyLine.getY(), item.getLength(), item.getWidth(), isRotate);
|
|
|
+ placeItem = new PlaceItem(item.getId(), skyLine.getX() + skyLine.getLength() - item.getLength(), skyLine.getY(), item.getWidth(), item.getLength(), true);
|
|
|
}
|
|
|
// 将新天际线加入队列
|
|
|
addSkyLineInQueue(skyLine.getX(), skyLine.getY(), skyLine.getLength() - placeItem.getWidth());
|