NAME
Box::Calc::Layer - A box is packed with multiple layers.
VERSION
version 0.0100
SYNOPSIS
my $row = Box::Calc::Row->new(max_x => 6);
METHODS
new(params)
Constructor.
NOTE: A layer is automatically created containing a single empty Box::Calc::Row.
- max_x
-
The maximimum width of the layer. This is equivalent to the
x
or longest dimension of the containing box. - max_y
-
The maximimum depth of the layer. This is equivalent to the
y
or middle dimension of the containing box.
fill_x()
Returns how full the layer is in the x
dimension.
fill_y()
Returns how full the layer is in the y
dimension.
fill_z()
Returns how full the layer is in the z
dimension.
max_x()
Returns the maximum x
dimension of this layer. See new
for details.
max_y()
Returns the maximum y
dimension of this layer. See new
for details.
rows()
Returns an array reference of the list of Box::Calc::Row contained in this layer.
count_rows()
Returns the number of rows contained in this layer.
create_row()
Adds a new Box::Calc::Row to this layer.
calculate_weight()
Calculates and returns the weight of all the rows in this layer.
pack_item(item)
Add a Box::Calc::Item to this layer.
- item
-
The Box::Calc::Item instance you want to add to this layer.
packing_list()
Returns an array reference of Box::Calc::Row packing lists.