Graphite  Version 3
An experimental 3D geometry processing program
mesh_grob_selections_commands.h
Go to the documentation of this file.
1 /*
2  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000-2009 INRIA - Project ALICE
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * If you modify this software, you should include a notice giving the
20  * name of the person performing the modification, the date of modification,
21  * and the reason for such modification.
22  *
23  * Contact: Bruno Levy - levy@loria.fr
24  *
25  * Project ALICE
26  * LORIA, INRIA Lorraine,
27  * Campus Scientifique, BP 239
28  * 54506 VANDOEUVRE LES NANCY CEDEX
29  * FRANCE
30  *
31  * Note that the GNU General Public License does not permit incorporating
32  * the Software into proprietary programs.
33  *
34  * As an exception to the GPL, Graphite can be linked with the following
35  * (non-GPL) libraries: Qt, SuperLU, WildMagic and CGAL
36  */
37 
38 
39 #ifndef H_OGF_MESH_COMMANDS_MESH_GROB_SELECTIONS_COMMANDS_H
40 #define H_OGF_MESH_COMMANDS_MESH_GROB_SELECTIONS_COMMANDS_H
41 
42 #include <OGF/mesh/common/common.h>
44 
50 namespace OGF {
51 
52 
56  gom_class MESH_API MeshGrobSelectionsCommands : public MeshGrobCommands {
57  public:
58 
63 
68 
69  gom_slots:
70 
71  void select_all();
72 
73  void select_none();
74 
75  void enlarge_selection(index_t nb_times=1);
76 
77  void shrink_selection(index_t nb_times=1);
78 
79  void close_small_holes_in_selection(index_t hole_size=1);
80 
81  void invert_selection();
82 
83  void delete_selected_elements(
84  bool delete_isolated_vertices = true
85  );
86 
87  void hide_selection();
88 
89 
95  void set_selection(const std::string& selection="*");
96 
101 
107 
113 
121  void select_duplicated_vertices(double tolerance=0.0);
122 
129 
134 
135 
141  void select_degenerate_facets(bool add_to_selection=false);
142 
152  bool add_to_selection=false, bool test_adjacent_facets=true
153  );
154 
161 
166 
172 
177 
178  protected:
183  MeshElementsFlags visible_selection() const;
184  };
185 }
186 
187 #endif
Base class for Commands related with a MeshGrob object.
Commands that manipulate mesh selections.
void set_selection(const std::string &selection="*")
sets the visible selection
void select_duplicated_facets()
For each set of duplicated facet, select one facet of the set. \menu Facets.
void select_duplicated_vertices(double tolerance=0.0)
Selects all the vertices that are duplicated in a mesh.
void select_facets_on_border()
Selects the facets incident to the border.
void select_intersecting_facets(bool add_to_selection=false, bool test_adjacent_facets=true)
Selects facets that have an intersection with another facet of the same mesh.
void select_vertices_on_degenerate_facets()
Selects all the vertices on triangles with their three vertices that are colinear....
void select_facets_from_vertices_selection()
Selects facets that have all their vertices selected \menu Facets.
void select_degenerate_facets(bool add_to_selection=false)
Selects facets with zero-area.
void unselect_vertices_on_surface_border()
Unselects all the vertices on the border of a surface. \menu Vertices.
MeshElementsFlags visible_selection() const
Gets the selection displayed in the current shader, or MESH_NONE if no selection is displayed.
~MeshGrobSelectionsCommands() override
MeshGrobSelectionsCommands destructor.
MeshGrobSelectionsCommands()
MeshGrobSelectionsCommands constructor.
void select_vertices_on_surface_border()
Selects all the vertices on the border of a surface. \menu Vertices.
Base class for Commands related with a MeshGrob object.
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76
Definitions common to all include files in the mesh library.