Some optimizations of "Fix crash on splitting some models #2042"

replaced std::vector<bool> with std::vector<unsigned char>
as std::vector<bool> is a specialized version optimized for memory,
not speed (8 bools are packed into a single boolean).
The triangle neighbor traversal was optimized to not push visited
or non-neighbors into the queue.
This commit is contained in:
bubnikv 2019-04-01 14:50:40 +02:00
parent 9821814604
commit fbce7b001b
2 changed files with 23 additions and 22 deletions

View file

@ -69,13 +69,13 @@ public:
bool empty() const { return this->facets_count() == 0; }
bool is_splittable() const;
std::deque<uint32_t> find_unvisited_neighbors(std::vector<bool> &facet_visited) const;
stl_file stl;
bool repaired;
private:
void require_shared_vertices();
std::deque<uint32_t> find_unvisited_neighbors(std::vector<unsigned char> &facet_visited) const;
friend class TriangleMeshSlicer;
};