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_;
202 current_seed_ = seed;
203 facet_vertices_.resize(0);
217 if(
id >= nb_vertices_) {
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);
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_;
A function to suppress unused parameters compilation warnings.
Generic mechanism for attributes.
A set of three integers that encodes the equation of a vertex in GenericVoronoiDiagram.
void unbind()
Unbinds this Attribute.
void bind(AttributesManager &manager, const std::string &name)
Binds this Attribute to an AttributesManager.
Abstract interface for Delaunay triangulation in Nd.
void connect()
Connects the facets.
index_t create_polygon(index_t nb_vertices)
Creates a polygonal facet.
void set_vertex(index_t f, index_t lv, index_t v)
Sets a vertex by facet and local vertex index.
AttributesManager & attributes() const
Gets the attributes manager.
const double * point_ptr(index_t v) const
Gets a point.
void set_dimension(index_t dim)
Sets the dimension of the vertices.
index_t dimension() const
Gets the dimension of the vertices.
index_t create_vertex()
Creates a new vertex.
void clear(bool keep_attributes=true, bool keep_memory=false)
Removes all the elements and attributes of this mesh.
Builds a Mesh using the symbolic information in the vertices computed by a RestrictedVoronoiDiagram.
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.
index_t size() const
Gets the number of elements.
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.
index_t max_index_t()
Gets the maximum positive value of type index_t.
void geo_argused(const T &)
Suppresses compiler warnings about unused parameters.
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.