We require a PHP class to accept
a list of 3D polygonal spaces
a list of items with id, known LxWxH, weight, boolean onFloor, boolean isStackable
Your task is to sort the items optimally into the available 3D spaces. Items that have 1 to the boolean onFloor must be on the bottom/floor of the the 3D space. Items that have 0 to the boolean isStackable must be on the top. Items of an equal or lower weight can only be tacked on top of the item below.
The class it to output a packing list, back bottom corner to top back right corner coming forwards.
Given that this is a complex sorting algorithm, you may with to accelerate it some way such as threading with Ruby/OpenCL.
All rights to source code to be transferred to me on completion of job.