64bit coord_t

Vec3i as a vertex index to TriangleMesh constructor
This commit is contained in:
bubnikv 2020-03-25 11:07:26 +01:00
parent bf5d52f221
commit c27297f6cc
16 changed files with 117 additions and 120 deletions

View file

@ -218,10 +218,10 @@ public:
bbox.min /= m_resolution;
bbox.max /= m_resolution;
// Trim with the cells.
bbox.min.x() = std::max(bbox.min.x(), 0);
bbox.min.y() = std::max(bbox.min.y(), 0);
bbox.max.x() = std::min(bbox.max.x(), (coord_t)m_cols - 1);
bbox.max.y() = std::min(bbox.max.y(), (coord_t)m_rows - 1);
bbox.min.x() = std::max<coord_t>(bbox.min.x(), 0);
bbox.min.y() = std::max<coord_t>(bbox.min.y(), 0);
bbox.max.x() = std::min<coord_t>(bbox.max.x(), (coord_t)m_cols - 1);
bbox.max.y() = std::min<coord_t>(bbox.max.y(), (coord_t)m_rows - 1);
for (coord_t iy = bbox.min.y(); iy <= bbox.max.y(); ++ iy)
for (coord_t ix = bbox.min.x(); ix <= bbox.max.x(); ++ ix)
if (! visitor(iy, ix))