Corrected mesh split implementation
This commit is contained in:
parent
8fdb0fddc0
commit
c542e6e14b
6 changed files with 275 additions and 126 deletions
|
@ -54,17 +54,10 @@ openvdb::FloatGrid::Ptr mesh_to_grid(const indexed_triangle_set & mesh,
|
|||
{
|
||||
openvdb::initialize();
|
||||
|
||||
std::vector<indexed_triangle_set> meshparts;
|
||||
its_split(mesh, std::back_inserter(meshparts));
|
||||
std::vector<indexed_triangle_set> meshparts = its_split(mesh);
|
||||
|
||||
// TriangleMeshPtrs meshparts_raw = mesh.split();
|
||||
// auto meshparts = reserve_vector<std::unique_ptr<TriangleMesh>>(meshparts_raw.size());
|
||||
// for (auto *p : meshparts_raw)
|
||||
// meshparts.emplace_back(p);
|
||||
|
||||
auto it = std::remove_if(meshparts.begin(), meshparts.end(), [](auto &m) {
|
||||
return its_volume(m) < EPSILON;
|
||||
});
|
||||
auto it = std::remove_if(meshparts.begin(), meshparts.end(),
|
||||
[](auto &m) { return its_volume(m) < EPSILON; });
|
||||
|
||||
meshparts.erase(it, meshparts.end());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue