38 #ifndef H_OGF_MESH_INTERFACES_MESH_GROB_EDITOR_INTERFACE_H
39 #define H_OGF_MESH_INTERFACES_MESH_GROB_EDITOR_INTERFACE_H
73 return dynamic_cast<MeshGrob*
>(grob());
81 void set_dimension(
index_t dim);
126 const std::string& attribute_name,
bool quiet=
false
139 const std::string& attribute_name,
153 const std::string& attribute_name,
173 return find_attribute(
"vertices.point");
321 NL::Vector* to_delete,
bool delete_isolated_vertices=
true
334 NL::Vector* to_delete,
bool delete_isolated_vertices=
true
347 NL::Vector* to_delete,
bool delete_isolated_vertices=
true
Generic mechanism for attributes.
Represents additional functions that can be attached to an object.
A wrapper to script low-level editing operations on a MeshGrob.
bool has_attribute(const std::string &attribute_name) const
Tests whether the mesh has an attribute.
void delete_cells(NL::Vector *to_delete, bool delete_isolated_vertices=true)
Deletes a set of cells.
MeshGrobEditor()
MeshGrobEditor constructor.
void clear()
clears this mesh.
void set_vertex(index_t v, double x=0.0, double y=0.0, double z=0.0)
Sets the coordinates of an existing vertex.
index_t create_vertices(index_t nb)
Creates multiple vertices.
MeshGrob * mesh_grob() const
Gets the wrapped MeshGrob.
void connect_facets()
Computes facet adjacencies.
bool check_mesh_grob() const
Checks whether MeshGrob is valid.
NL::Vector * get_tetrahedra() const
If the volume mesh is tetrahedralized, gets the array of tetrahedra.
NL::Vector * create_attribute(const std::string &attribute_name, index_t dimension=1, MetaType *type=nullptr)
Creates an attribute.
index_t get_nb_facets() const
Gets the number of facets.
index_t create_edge(index_t v1, index_t v2)
Creates an edge.
NL::Vector * find_or_create_attribute(const std::string &attribute_name, index_t dimension=1, MetaType *type=nullptr)
Creates an attribute.
index_t facet_nb_vertices(index_t f) const
Gets the number of vertices in a facet.
index_t get_nb_cells() const
Gets the number of cells.
void delete_edges(NL::Vector *to_delete, bool delete_isolated_vertices=true)
Deletes a set of edges.
index_t create_facet(index_t nb_vertices)
Creates a facet.
NL::Vector * get_triangle_adjacents() const
If the surface mesh is triangulated, gets the array of triangles.
NL::Vector * get_tetrahedra_adjacents() const
If the volume mesh is tetrahedralized, gets the array of tetrahedra adjacencies.
index_t get_dimension() const
Gets the dimension.
index_t create_vertex(double x=0.0, double y=0.0, double z=0.0)
Creates a new vertex.
void update()
Redisplays the wrapped MeshGrob.
bool check_facet_index(index_t f) const
Checks whether a facet index is valid.
~MeshGrobEditor() override
MeshGrobEditor destrutor.
index_t get_nb_edges() const
Gets the number of edges.
index_t get_nb_vertices() const
Gets the number of vertices.
void delete_facets(NL::Vector *to_delete, bool delete_isolated_vertices=true)
Deletes a set of facets.
NL::Vector * get_triangles() const
If the surface mesh is triangulated, gets the array of triangles.
void delete_vertices(NL::Vector *to_delete)
Deletes a set of vertices.
index_t create_quad(index_t v1, index_t v2, index_t v3, index_t v4)
Creates a quad.
index_t facet_vertex(index_t f, index_t lv) const
Gets a vertex in a facet.
index_t create_triangle(index_t v1, index_t v2, index_t v3)
Creates a triangle.
bool check_vertex_index(index_t v) const
Checks whether a vertex index is valid.
void set_facet_vertex(index_t f, index_t lv, index_t v)
Sets a vertex of the facet.
NL::Vector * get_points()
Gets the points.
A Grob wrapper around Geogram's Mesh class.
A scriptable Vector objects.
class that gathers commands with menu and dialogs.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
Definitions common to all include files in the mesh library.