only add valid
bounding boxes (make backward compatible)
This commit is contained in:
parent
218fba4479
commit
df10fab439
1 changed files with 7 additions and 4 deletions
|
@ -54,11 +54,14 @@ struct extract_positions
|
||||||
{
|
{
|
||||||
auto const& r = std::get<0>(val);
|
auto const& r = std::get<0>(val);
|
||||||
auto const& b = std::get<1>(val);
|
auto const& b = std::get<1>(val);
|
||||||
|
if (b.valid())
|
||||||
|
{
|
||||||
auto offset = std::distance(start_, r.begin());
|
auto offset = std::distance(start_, r.begin());
|
||||||
auto size = std::distance(r.begin(), r.end());
|
auto size = std::distance(r.begin(), r.end());
|
||||||
boxes_.emplace_back(std::make_pair(box_type(b.minx(), b.miny(), b.maxx(), b.maxy()), std::make_pair(offset, size)));
|
boxes_.emplace_back(std::make_pair(box_type(b.minx(), b.miny(), b.maxx(), b.maxy()), std::make_pair(offset, size)));
|
||||||
//boxes_.emplace_back(std::make_tuple(bbox,offset, size));
|
//boxes_.emplace_back(std::make_tuple(bbox,offset, size));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Iterator start_;
|
Iterator start_;
|
||||||
Boxes & boxes_;
|
Boxes & boxes_;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue