public function getDepth(): int
    {
        $layerDepth = 0;

        foreach ($this->items as $item) {
            $layerDepth = max($layerDepth, $item->getZ() + $item->getDepth());
        }

        return $layerDepth - $this->getStartDepth();
    }