Skip to content

Commit

Permalink
Added region attribute to vertex class
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseudomanifold committed Feb 19, 2011
1 parent 06325ea commit 88a068d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ vertex::vertex()
boundary = false;
vertex_point = NULL;
id = std::numeric_limits<size_t>::max();
region = std::numeric_limits<size_t>::max();
scale_attribute = 0.0;

// FIXME: this->set(...) should be called here in order to avoid code
// duplication
}

/*!
Expand Down Expand Up @@ -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<size_t>::max();
}

/*!
Expand Down
2 changes: 2 additions & 0 deletions vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<edge*> E;
std::vector<const face*> F;
Expand Down

0 comments on commit 88a068d

Please sign in to comment.