Graphite  Version 3
An experimental 3D geometry processing program
mesh_grob_points_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
35  * with the following (non-GPL) libraries:
36  * Qt, SuperLU, WildMagic and CGAL
37  */
38 
39 
40 #ifndef H_OGF_MESH_COMMANDS_MESH_GROB_POINTS_COMMANDS_H
41 #define H_OGF_MESH_COMMANDS_MESH_GROB_POINTS_COMMANDS_H
42 
43 #include <OGF/mesh/common/common.h>
45 
50 namespace OGF {
51 
55  gom_class MESH_API MeshGrobPointsCommands : public MeshGrobCommands {
56  public:
61 
66 
67  gom_slots:
68 
69  /********************************************************/
70 
78  void smooth_point_set(
79  unsigned int nb_iterations = 1,
80  unsigned int nb_neighbors = 30
81  );
82 
83  /********************************************************/
84 
94  index_t nb = 10,
95  double radius = 0.01,
96  bool relative_radius = true
97  );
98 
99  /********************************************************/
100 
115  bool estimate_normals(index_t nb_neighbors = 30, bool reorient=true);
116 
117  /********************************************************/
118 
130  double radius = 0.005,
131  bool relative_radius = true,
132  const std::string& attribute = "density"
133  );
134 
135  /********************************************************/
136 
149  double radius = 5.0,
150  unsigned int nb_smoothing_iterations = 1,
151  unsigned int nb_neighbors = 30
152  );
153 
154  /********************************************************/
155 
165  const NewMeshGrobName& reconstruction = "reconstruction",
166  unsigned int depth = 8
167  );
168 
169  /********************************************************/
170 
177 
178  /********************************************************/
179 
180 
194  const NewMeshGrobName& points = "points",
195  bool copy_normals = false,
196  unsigned int nb_points = 30000,
197  unsigned int Lloyd_iter = 5,
198  unsigned int Newton_iter = 30,
199  unsigned int Newton_m = 7
200  );
201 
202  /********************************************************/
203 
215  const NewMeshGrobName& points = "points",
216  unsigned int nb_points = 30000,
217  unsigned int Lloyd_iter = 5,
218  unsigned int Newton_iter = 30,
219  unsigned int Newton_m = 7
220  );
221 
222 
223  /********************************************************/
224 
229 
230  /********************************************************/
231 
238  double x,
239  double y,
240  double z,
241  bool selected = false
242  );
243 
244  /********************************************************/
245 
251  const MeshGrobName& surface
252  );
253 
254  };
255 
256  /********************************************************/
257 
258 }
259 
260 #endif
261 
Base class for Commands related with a MeshGrob object.
Commands that manipulate point sets.
void sample_volume(const NewMeshGrobName &points="points", unsigned int nb_points=30000, unsigned int Lloyd_iter=5, unsigned int Newton_iter=30, unsigned int Newton_m=7)
Creates a pointset that samples a volume.
bool estimate_normals(index_t nb_neighbors=30, bool reorient=true)
Estimates the normal vector to a point-sampled surface using K nearest neighbors. The computed normal...
void detect_outliers(index_t nb=10, double radius=0.01, bool relative_radius=true)
Marks isolated points as selection.
void project_on_surface(const MeshGrobName &surface)
Projects a mesh onto a surface.
MeshGrobPointsCommands()
MeshGrobPointsCommands constructor.
~MeshGrobPointsCommands() override
MeshGrobPointsCommands destructor.
void estimate_density(double radius=0.005, bool relative_radius=true, const std::string &attribute="density")
Estimates the density.
void create_vertex(double x, double y, double z, bool selected=false)
Creates a new vertex at given coordinates.
void reconstruct_surface_Poisson(const NewMeshGrobName &reconstruction="reconstruction", unsigned int depth=8)
Reconstructs a surface from points and normals using Misha Kahzdan's Screened Poisson Reconstruction.
void delete_selected_points()
Delete all points marked as selection.
void reconstruct_surface_SSSR(double radius=5.0, unsigned int nb_smoothing_iterations=1, unsigned int nb_neighbors=30)
Reconstructs a surface from a point set using Simple and Scalable Surface Reconstruction.
void sample_surface(const NewMeshGrobName &points="points", bool copy_normals=false, unsigned int nb_points=30000, unsigned int Lloyd_iter=5, unsigned int Newton_iter=30, unsigned int Newton_m=7)
Creates a pointset that samples a surface.
void reconstruct_surface_Delaunay2d()
Reconstructs a surface from points using a 2D Delaunay triangulation. Can be used for Digital Elevati...
A template class for strings that need to have a specific type in the GOM system.
Definition: properties.h:218
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.