26 std::array<double, 3>
coords = {{0, 0, 0}};
32 double operator[](
const int i)
const {
return coords[i]; }
53 const Point &
point(
const int v)
const {
return points_[v]; }
57 int create_vertices(
int n);
59 int create_vertex(
const Point &p);
63 void bounding_box(Point &min, Point &max)
const;
67 int n_facets()
const {
return int(facet_ptr_.size()) - 1; }
69 int facet_vertex(
const int f,
const int lv)
const {
return corner_vertex_[facet_ptr_[f] + lv]; }
71 int n_corners()
const {
return corner_vertex_.size(); }
73 int corners_end(
const int f)
const {
return facet_ptr_[f + 1]; }
74 int facet_corner(
const int f,
const int lv)
const {
return facet_ptr_[f] + lv; }
82 int create_polygon(
const std::vector<int> &vertices);
85 void flip_facet(
int f);
92 void delete_facets(
const std::vector<bool> &to_delete);
96 void connect_facets();
100 int connected_components(std::vector<int> &component)
const;
105 int edge_vertex(
const int e,
const int lv)
const {
return edges_[e][lv]; }
106 int create_edge(
int v0,
int v1);
118 std::vector<int> facet_ptr_ = {0};
Minimal polygonal surface mesh used as the storage of CMesh2D.
std::vector< int > corner_vertex_
const Point & point(const int v) const
int corner_vertex(const int c) const
std::vector< Point > points_
int next_corner_around_facet(const int f, const int c) const
int corners_end(const int f) const
int facet_vertex(const int f, const int lv) const
int n_facet_vertices(const int f) const
std::vector< bool > boundary_edge
Whether each edge is on the boundary.
int edge_vertex(const int e, const int lv) const
std::vector< std::array< int, 2 > > edges_
int corner_adjacent_facet(const int c) const
Facet across the edge from corner c to the next corner of its facet, or -1.
std::vector< bool > boundary_vertex
Whether each vertex is on the boundary.
int facet_corner(const int f, const int lv) const
int prev_corner_around_facet(const int f, const int c) const
int corners_begin(const int f) const
Point & point(const int v)
std::vector< int > corner_edge
Index of the edge starting at each corner.
std::vector< int > corner_adjacent_facet_
Point operator/(const double s) const
Point & operator+=(const Point &v)
double operator[](const int i) const
Point(const double x, const double y, const double z)
Point operator-(const Point &v) const
Point operator+(const Point &v) const
friend Point operator*(const double s, const Point &v)
std::array< double, 3 > coords
double & operator[](const int i)