Свойство | Тип | Описание | |
---|---|---|---|
$box | DVDoug\BoxPacker\Box | Box to pack items into | |
$depthLeft | integer | Remaining depth of the box to pack items into | |
$items | List of items to be packed | ||
$lengthLeft | integer | Remaining length of the box to pack items into | |
$remainingWeight | integer | Remaining weight capacity of the box | |
$widthLeft | integer | Remaining width of the box to pack items into |
Метод | Описание | |
---|---|---|
__construct ( DVDoug\BoxPacker\Box $box, |
Constructor | |
pack ( ) : DVDoug\BoxPacker\PackedBox | Pack as many items as possible into specific given box |
Метод | Описание | |
---|---|---|
findBestOrientation ( DVDoug\BoxPacker\Item $item, |
Get the best orientation for an item | |
findPossibleOrientations ( DVDoug\BoxPacker\Item $item, |
Find all possible orientations for an item | |
isLayerStarted ( integer $layerWidth, integer $layerLength, integer $layerDepth ) : boolean | ||
tryAndStackItemsIntoSpace ( |
Figure out if we can stack the next item vertically on top of this rather than side by side Used when we've packed a tall item, and have just put a shorter one next to it |
public __construct ( DVDoug\BoxPacker\Box $box, |
||
$box | DVDoug\BoxPacker\Box | |
$items |
protected findBestOrientation ( DVDoug\BoxPacker\Item $item, |
||
$item | DVDoug\BoxPacker\Item | |
$prevItem | ||
$nextItem | DVDoug\BoxPacker\Item | |
$widthLeft | integer | |
$lengthLeft | integer | |
$depthLeft | integer | |
Результат |
protected findPossibleOrientations ( DVDoug\BoxPacker\Item $item, |
||
$item | DVDoug\BoxPacker\Item | |
$prevItem | ||
$widthLeft | integer | |
$lengthLeft | integer | |
$depthLeft | integer | |
Результат |
public pack ( ) : DVDoug\BoxPacker\PackedBox | ||
Результат | DVDoug\BoxPacker\PackedBox | packed box |
protected Box,DVDoug\BoxPacker $box | ||
Результат | DVDoug\BoxPacker\Box |
protected int $depthLeft | ||
Результат | integer |
protected ItemList,DVDoug\BoxPacker $items | ||
Результат |
protected int $lengthLeft | ||
Результат | integer |
protected int $remainingWeight | ||
Результат | integer |
protected int $widthLeft | ||
Результат | integer |