fixes #3 by checking Half Edge Handle validity on circulator creation

This commit is contained in:
Martin Schultz
2015-10-01 15:55:07 +02:00
parent c8316a013e
commit 3df14fae1a

View File

@@ -202,7 +202,7 @@ class GenericCirculatorBaseT {
GenericCirculatorBaseT() : mesh_(0), lap_counter_(0) {}
GenericCirculatorBaseT(mesh_ref mesh, HalfedgeHandle heh, bool end = false) :
mesh_(&mesh), start_(heh), heh_(heh), lap_counter_(static_cast<int>(end)) {}
mesh_(&mesh), start_(heh), heh_(heh), lap_counter_(static_cast<int>(end && heh.is_valid())) {}
GenericCirculatorBaseT(const GenericCirculatorBaseT &rhs) :
mesh_(rhs.mesh_), start_(rhs.start_), heh_(rhs.heh_), lap_counter_(rhs.lap_counter_) {}