40#ifndef GEOGRAM_VORONOI_RVD_MESH_BUILDER
41#define GEOGRAM_VORONOI_RVD_MESH_BUILDER
119 for(
index_t i = 0; i < 3; i++) {
120 if(sym.indices[i] >= 0) {
130 std::map<quadindex, index_t> ppp_to_id_;
135 std::map<signed_quadindex, index_t> ppm_to_id_;
140 std::map<signed_quadindex, index_t> pmm_to_id_;
181 target_->vertices.set_dimension(dim_);
182 facet_region_.bind(target_->facets.attributes(),
"region");
202 current_seed_ = seed;
203 facet_vertices_.resize(0);
214 index_t id = vertex_map_.find_or_create_vertex(
217 if(
id >= nb_vertices_) {
218 index_t v = target_->vertices.create_vertex();
219 for(
index_t c=0; c<dim_; ++c) {
220 target_->vertices.point_ptr(v)[c] = point[c];
222 nb_vertices_ =
id + 1;
224 facet_vertices_.push_back(
id);
233 index_t f = target_->facets.create_polygon(facet_vertices_.size());
234 for(
index_t lv=0; lv<facet_vertices_.size(); ++lv) {
235 target_->facets.set_vertex(f,lv,facet_vertices_[lv]);
237 facet_region_[f] = current_seed_;
251 target_->facets.connect();
252 facet_region_.unbind();
A function to suppress unused parameters compilation warnings.
Generic mechanism for attributes.
Manages an attribute attached to a set of object.
Abstract interface for Delaunay triangulation in Nd.
index_t dimension() const
Gets the dimension of the vertices.
RVDMeshBuilder(Mesh *target, Mesh *reference, Delaunay *)
Constructs a new RVDMeshBuilder.
void begin_surface()
Starts to build a new surface.
void add_vertex_to_facet(const double *point, const SymbolicVertex &sym)
Adds a vertex to the current facet.
void begin_facet(index_t seed)
Starts a new facet of the restricted Voronoi diagram.
void end_surface()
Terminates the current surface.
void begin_reference_facet(index_t ref_facet)
Starts a new reference facet.
void end_facet()
Terminates the current facet.
void set_dimension(coord_index_t x)
Specifies the dimension to be used.
void end_reference_facet()
Terminates the current reference facet.
RVDVertexMap maps symbolic vertices to unique ids.
index_t nb_bisectors(const signed_trindex &sym) const
Gets the number of bisectors represented in a symbolic vertex.
void set_first_vertex_index(index_t i)
Defines the index of the first created vertex.
RVDVertexMap()
Constructs an empty map.
index_t new_vertex()
Allocates a new vertex.
index_t find_or_create_vertex(index_t center_vertex_id, const SymbolicVertex &sym)
Maps the symbolic information of a vertex into a unique identifier.
Vector with aligned memory allocation.
Generic implementation of restricted Voronoi diagrams.
Common include file, providing basic definitions. Should be included before anything else by all head...
Classes for managing tuples of indices.
basic_trindex< signed_index_t > signed_trindex
A basic_trindex made of 3 signed integers.
The class that represents a mesh.
Global Vorpaline namespace.
void geo_argused(const T &)
Suppresses compiler warnings about unused parameters.
GEOGen::SymbolicVertex SymbolicVertex
Symbolic representation of a RestrictedVoronoiDiagram vertex.
geo_index_t index_t
The type for storing and manipulating indices.
geo_coord_index_t coord_index_t
The type for storing coordinate indices, and iterating on the coordinates of a point.
constexpr index_t max_index_t()
Gets the maximum positive value of type index_t.