| 1 | <?php |
||
| 16 | class PackedLayer |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Items packed into this layer. |
||
| 20 | * |
||
| 21 | * @var PackedItem[] |
||
| 22 | */ |
||
| 23 | protected $items = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Add a packed item to this layer. |
||
| 27 | * |
||
| 28 | * @param PackedItem $packedItem |
||
| 29 | */ |
||
| 30 | 20 | public function insert(PackedItem $packedItem): void |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Get the packed items. |
||
| 37 | * |
||
| 38 | * @return PackedItem[] |
||
| 39 | */ |
||
| 40 | 20 | public function getItems(): array |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Calculate footprint area of this layer. |
||
| 47 | * |
||
| 48 | * @return int mm^2 |
||
| 49 | */ |
||
| 50 | 11 | public function getFootprint(): int |
|
| 62 | |||
| 63 | /** |
||
| 64 | * Calculate start depth of this layer. |
||
| 65 | * |
||
| 66 | * @return int mm |
||
| 67 | */ |
||
| 68 | 20 | public function getStartDepth(): int |
|
| 78 | |||
| 79 | /** |
||
| 80 | * Calculate depth of this layer. |
||
| 81 | * |
||
| 82 | * @return int mm |
||
| 83 | */ |
||
| 84 | 20 | public function getDepth(): int |
|
| 94 | } |
||
| 95 |