diff --git a/vcg/space/outline2_packer.h b/vcg/space/outline2_packer.h index ff01bb0b..5343ad0b 100644 --- a/vcg/space/outline2_packer.h +++ b/vcg/space/outline2_packer.h @@ -143,7 +143,8 @@ static bool PackAsAxisAlignedRect(const std::vector< std::vector > &pol static bool PackAsObjectOrientedRect(const std::vector< std::vector > &polyVec, const Point2i containerSizeX, std::vector &trVec, - Point2x &coveredContainer) + Point2x &coveredContainer, + SCALAR_TYPE border=0) { trVec.clear(); trVec.resize(polyVec.size()); @@ -153,6 +154,8 @@ static bool PackAsObjectOrientedRect(const std::vector< std::vector > & { float rot; bbVec.push_back(getPolyOOBB(polyVec[i],rot)); + if (border>0) + bbVec.back().Offset(border); rotVec.push_back(rot); }