diff --git a/vertex.cpp b/vertex.cpp index eceaa9f..ffd935f 100644 --- a/vertex.cpp +++ b/vertex.cpp @@ -22,7 +22,11 @@ vertex::vertex() boundary = false; vertex_point = NULL; id = std::numeric_limits::max(); + region = std::numeric_limits::max(); scale_attribute = 0.0; + + // FIXME: this->set(...) should be called here in order to avoid code + // duplication } /*! @@ -85,6 +89,9 @@ void vertex::set(double x, double y, double z, double nx, double ny, double nz, // Sensible default for any vertex. Negative values make no sense, as // the scale attribute is composed of edge lengths. scale_attribute = 0.0; + + // By default, no region is assigned to the vertex + region = std::numeric_limits::max(); } /*! diff --git a/vertex.h b/vertex.h index 582639d..e62c3c4 100644 --- a/vertex.h +++ b/vertex.h @@ -91,6 +91,8 @@ class vertex double calc_mixed_area() const; double calc_ring_area() const; + size_t region; // XXX: Identifies region the vertex belongs to + private: std::vector E; std::vector F;