NAME
Box::Calc::Row - The smallest organizational unit in a box.
VERSION
version 0.0100
SYNOPSIS
my $row = Box::Calc::Row->new(max_x => 6);
METHODS
new(params)
Constructor.
- max_x
-
The maximimum width of the row. This is equivalent to the
x
or longest dimension of the containing box.
fill_x()
Returns how full the row is in the x
dimension.
fill_y()
Returns how full the row is in the y
dimension.
fill_z()
Returns how full the row is in the z
dimension.
max_x()
Returns the maximum x
dimension of this row. See new
for details.
items()
Returns an array reference of items contained in this row.
count_items()
Returns the number of items contained in this row.
calculate_weight()
Calculates the weight of all the items in this row, and returns that value.
pack_item(item)
Places an item into the row, and updates all the relevant statistics about the row.
Throws x too big
Ouch if the item cannot fit into the row.
- item
-
A Box::Calc::Item instance.
packing_list()
Returns an array reference of item names contained in this row.