Point Cloud Library (PCL)  1.9.1-dev
gp3.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2011, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * $Id$
37  *
38  */
39 
40 #pragma once
41 
42 // PCL includes
43 #include <pcl/surface/reconstruction.h>
44 #include <pcl/surface/boost.h>
45 
46 #include <pcl/conversions.h>
47 #include <pcl/kdtree/kdtree.h>
48 #include <pcl/kdtree/kdtree_flann.h>
49 #include <pcl/PolygonMesh.h>
50 
51 #include <fstream>
52 #include <iostream>
53 
54 
55 
56 namespace pcl
57 {
58  /** \brief Returns if a point X is visible from point R (or the origin)
59  * when taking into account the segment between the points S1 and S2
60  * \param X 2D coordinate of the point
61  * \param S1 2D coordinate of the segment's first point
62  * \param S2 2D coordinate of the segment's second point
63  * \param R 2D coordinate of the reference point (defaults to 0,0)
64  * \ingroup surface
65  */
66  inline bool
67  isVisible (const Eigen::Vector2f &X, const Eigen::Vector2f &S1, const Eigen::Vector2f &S2,
68  const Eigen::Vector2f &R = Eigen::Vector2f::Zero ())
69  {
70  double a0 = S1[1] - S2[1];
71  double b0 = S2[0] - S1[0];
72  double c0 = S1[0]*S2[1] - S2[0]*S1[1];
73  double a1 = -X[1];
74  double b1 = X[0];
75  double c1 = 0;
76  if (R != Eigen::Vector2f::Zero())
77  {
78  a1 += R[1];
79  b1 -= R[0];
80  c1 = R[0]*X[1] - X[0]*R[1];
81  }
82  double div = a0*b1 - b0*a1;
83  double x = (b0*c1 - b1*c0) / div;
84  double y = (a1*c0 - a0*c1) / div;
85 
86  bool intersection_outside_XR;
87  if (R == Eigen::Vector2f::Zero())
88  {
89  if (X[0] > 0)
90  intersection_outside_XR = (x <= 0) || (x >= X[0]);
91  else if (X[0] < 0)
92  intersection_outside_XR = (x >= 0) || (x <= X[0]);
93  else if (X[1] > 0)
94  intersection_outside_XR = (y <= 0) || (y >= X[1]);
95  else if (X[1] < 0)
96  intersection_outside_XR = (y >= 0) || (y <= X[1]);
97  else
98  intersection_outside_XR = true;
99  }
100  else
101  {
102  if (X[0] > R[0])
103  intersection_outside_XR = (x <= R[0]) || (x >= X[0]);
104  else if (X[0] < R[0])
105  intersection_outside_XR = (x >= R[0]) || (x <= X[0]);
106  else if (X[1] > R[1])
107  intersection_outside_XR = (y <= R[1]) || (y >= X[1]);
108  else if (X[1] < R[1])
109  intersection_outside_XR = (y >= R[1]) || (y <= X[1]);
110  else
111  intersection_outside_XR = true;
112  }
113  if (intersection_outside_XR)
114  return true;
115  else
116  {
117  if (S1[0] > S2[0])
118  return (x <= S2[0]) || (x >= S1[0]);
119  else if (S1[0] < S2[0])
120  return (x >= S2[0]) || (x <= S1[0]);
121  else if (S1[1] > S2[1])
122  return (y <= S2[1]) || (y >= S1[1]);
123  else if (S1[1] < S2[1])
124  return (y >= S2[1]) || (y <= S1[1]);
125  else
126  return false;
127  }
128  }
129 
130  /** \brief GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points
131  * based on local 2D projections. It assumes locally smooth surfaces and relatively smooth transitions between
132  * areas with different point densities.
133  * \author Zoltan Csaba Marton
134  * \ingroup surface
135  */
136  template <typename PointInT>
138  {
139  public:
140  typedef boost::shared_ptr<GreedyProjectionTriangulation<PointInT> > Ptr;
141  typedef boost::shared_ptr<const GreedyProjectionTriangulation<PointInT> > ConstPtr;
142 
146 
147  typedef typename pcl::KdTree<PointInT> KdTree;
149 
153 
154  enum GP3Type
155  {
156  NONE = -1, // not-defined
157  FREE = 0,
158  FRINGE = 1,
159  BOUNDARY = 2,
161  };
162 
163  /** \brief Empty constructor. */
165  mu_ (0),
166  search_radius_ (0), // must be set by user
167  nnn_ (100),
168  minimum_angle_ (M_PI/18), // 10 degrees
169  maximum_angle_ (2*M_PI/3), // 120 degrees
170  eps_angle_(M_PI/4), //45 degrees,
171  consistent_(false),
172  consistent_ordering_ (false),
173  triangle_ (),
174  coords_ (),
175  angles_ (),
176  R_ (),
177  state_ (),
178  source_ (),
179  ffn_ (),
180  sfn_ (),
181  part_ (),
182  fringe_queue_ (),
183  is_current_free_ (false),
184  current_index_ (),
185  prev_is_ffn_ (false),
186  prev_is_sfn_ (false),
187  next_is_ffn_ (false),
188  next_is_sfn_ (false),
189  changed_1st_fn_ (false),
190  changed_2nd_fn_ (false),
191  new2boundary_ (),
192  already_connected_ (false),
193  proj_qp_ (),
194  u_ (),
195  v_ (),
196  uvn_ffn_ (),
197  uvn_sfn_ (),
198  uvn_next_ffn_ (),
199  uvn_next_sfn_ (),
200  tmp_ ()
201  {};
202 
203  /** \brief Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point
204  * (this will make the algorithm adapt to different point densities in the cloud).
205  * \param[in] mu the multiplier
206  */
207  inline void
208  setMu (double mu) { mu_ = mu; }
209 
210  /** \brief Get the nearest neighbor distance multiplier. */
211  inline double
212  getMu () const { return (mu_); }
213 
214  /** \brief Set the maximum number of nearest neighbors to be searched for.
215  * \param[in] nnn the maximum number of nearest neighbors
216  */
217  inline void
218  setMaximumNearestNeighbors (int nnn) { nnn_ = nnn; }
219 
220  /** \brief Get the maximum number of nearest neighbors to be searched for. */
221  inline int
222  getMaximumNearestNeighbors () const { return (nnn_); }
223 
224  /** \brief Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating.
225  * \param[in] radius the sphere radius that is to contain all k-nearest neighbors
226  * \note This distance limits the maximum edge length!
227  */
228  inline void
229  setSearchRadius (double radius) { search_radius_ = radius; }
230 
231  /** \brief Get the sphere radius used for determining the k-nearest neighbors. */
232  inline double
233  getSearchRadius () const { return (search_radius_); }
234 
235  /** \brief Set the minimum angle each triangle should have.
236  * \param[in] minimum_angle the minimum angle each triangle should have
237  * \note As this is a greedy approach, this will have to be violated from time to time
238  */
239  inline void
240  setMinimumAngle (double minimum_angle) { minimum_angle_ = minimum_angle; }
241 
242  /** \brief Get the parameter for distance based weighting of neighbors. */
243  inline double
244  getMinimumAngle () const { return (minimum_angle_); }
245 
246  /** \brief Set the maximum angle each triangle can have.
247  * \param[in] maximum_angle the maximum angle each triangle can have
248  * \note For best results, its value should be around 120 degrees
249  */
250  inline void
251  setMaximumAngle (double maximum_angle) { maximum_angle_ = maximum_angle; }
252 
253  /** \brief Get the parameter for distance based weighting of neighbors. */
254  inline double
255  getMaximumAngle () const { return (maximum_angle_); }
256 
257  /** \brief Don't consider points for triangulation if their normal deviates more than this value from the query point's normal.
258  * \param[in] eps_angle maximum surface angle
259  * \note As normal estimation methods usually give smooth transitions at sharp edges, this ensures correct triangulation
260  * by avoiding connecting points from one side to points from the other through forcing the use of the edge points.
261  */
262  inline void
263  setMaximumSurfaceAngle (double eps_angle) { eps_angle_ = eps_angle; }
264 
265  /** \brief Get the maximum surface angle. */
266  inline double
267  getMaximumSurfaceAngle () const { return (eps_angle_); }
268 
269  /** \brief Set the flag if the input normals are oriented consistently.
270  * \param[in] consistent set it to true if the normals are consistently oriented
271  */
272  inline void
273  setNormalConsistency (bool consistent) { consistent_ = consistent; }
274 
275  /** \brief Get the flag for consistently oriented normals. */
276  inline bool
277  getNormalConsistency () const { return (consistent_); }
278 
279  /** \brief Set the flag to order the resulting triangle vertices consistently (positive direction around normal).
280  * @note Assumes consistently oriented normals (towards the viewpoint) -- see setNormalConsistency ()
281  * \param[in] consistent_ordering set it to true if triangle vertices should be ordered consistently
282  */
283  inline void
284  setConsistentVertexOrdering (bool consistent_ordering) { consistent_ordering_ = consistent_ordering; }
285 
286  /** \brief Get the flag signaling consistently ordered triangle vertices. */
287  inline bool
289 
290  /** \brief Get the state of each point after reconstruction.
291  * \note Options are defined as constants: FREE, FRINGE, COMPLETED, BOUNDARY and NONE
292  */
293  inline std::vector<int>
294  getPointStates () const { return (state_); }
295 
296  /** \brief Get the ID of each point after reconstruction.
297  * \note parts are numbered from 0, a -1 denotes unconnected points
298  */
299  inline std::vector<int>
300  getPartIDs () const { return (part_); }
301 
302 
303  /** \brief Get the sfn list. */
304  inline std::vector<int>
305  getSFN () const { return (sfn_); }
306 
307  /** \brief Get the ffn list. */
308  inline std::vector<int>
309  getFFN () const { return (ffn_); }
310 
311  protected:
312  /** \brief The nearest neighbor distance multiplier to obtain the final search radius. */
313  double mu_;
314 
315  /** \brief The nearest neighbors search radius for each point and the maximum edge length. */
317 
318  /** \brief The maximum number of nearest neighbors accepted by searching. */
319  int nnn_;
320 
321  /** \brief The preferred minimum angle for the triangles. */
323 
324  /** \brief The maximum angle for the triangles. */
326 
327  /** \brief Maximum surface angle. */
328  double eps_angle_;
329 
330  /** \brief Set this to true if the normals of the input are consistently oriented. */
332 
333  /** \brief Set this to true if the output triangle vertices should be consistently oriented. */
335 
336  private:
337  /** \brief Struct for storing the angles to nearest neighbors **/
338  struct nnAngle
339  {
340  double angle;
341  int index;
342  int nnIndex;
343  bool visible;
344  };
345 
346  /** \brief Struct for storing the edges starting from a fringe point **/
347  struct doubleEdge
348  {
349  doubleEdge () : index (0), first (), second () {}
350  int index;
351  Eigen::Vector2f first;
352  Eigen::Vector2f second;
353  };
354 
355  // Variables made global to decrease the number of parameters to helper functions
356 
357  /** \brief Temporary variable to store a triangle (as a set of point indices) **/
358  pcl::Vertices triangle_;
359  /** \brief Temporary variable to store point coordinates **/
360  std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > coords_;
361 
362  /** \brief A list of angles to neighbors **/
363  std::vector<nnAngle> angles_;
364  /** \brief Index of the current query point **/
365  int R_;
366  /** \brief List of point states **/
367  std::vector<int> state_;
368  /** \brief List of sources **/
369  std::vector<int> source_;
370  /** \brief List of fringe neighbors in one direction **/
371  std::vector<int> ffn_;
372  /** \brief List of fringe neighbors in other direction **/
373  std::vector<int> sfn_;
374  /** \brief Connected component labels for each point **/
375  std::vector<int> part_;
376  /** \brief Points on the outer edge from which the mesh has to be grown **/
377  std::vector<int> fringe_queue_;
378 
379  /** \brief Flag to set if the current point is free **/
380  bool is_current_free_;
381  /** \brief Current point's index **/
382  int current_index_;
383  /** \brief Flag to set if the previous point is the first fringe neighbor **/
384  bool prev_is_ffn_;
385  /** \brief Flag to set if the next point is the second fringe neighbor **/
386  bool prev_is_sfn_;
387  /** \brief Flag to set if the next point is the first fringe neighbor **/
388  bool next_is_ffn_;
389  /** \brief Flag to set if the next point is the second fringe neighbor **/
390  bool next_is_sfn_;
391  /** \brief Flag to set if the first fringe neighbor was changed **/
392  bool changed_1st_fn_;
393  /** \brief Flag to set if the second fringe neighbor was changed **/
394  bool changed_2nd_fn_;
395  /** \brief New boundary point **/
396  int new2boundary_;
397 
398  /** \brief Flag to set if the next neighbor was already connected in the previous step.
399  * To avoid inconsistency it should not be connected again.
400  */
401  bool already_connected_;
402 
403  /** \brief Point coordinates projected onto the plane defined by the point normal **/
404  Eigen::Vector3f proj_qp_;
405  /** \brief First coordinate vector of the 2D coordinate frame **/
406  Eigen::Vector3f u_;
407  /** \brief Second coordinate vector of the 2D coordinate frame **/
408  Eigen::Vector3f v_;
409  /** \brief 2D coordinates of the first fringe neighbor **/
410  Eigen::Vector2f uvn_ffn_;
411  /** \brief 2D coordinates of the second fringe neighbor **/
412  Eigen::Vector2f uvn_sfn_;
413  /** \brief 2D coordinates of the first fringe neighbor of the next point **/
414  Eigen::Vector2f uvn_next_ffn_;
415  /** \brief 2D coordinates of the second fringe neighbor of the next point **/
416  Eigen::Vector2f uvn_next_sfn_;
417 
418  /** \brief Temporary variable to store 3 coordinates **/
419  Eigen::Vector3f tmp_;
420 
421  /** \brief The actual surface reconstruction method.
422  * \param[out] output the resultant polygonal mesh
423  */
424  void
425  performReconstruction (pcl::PolygonMesh &output);
426 
427  /** \brief The actual surface reconstruction method.
428  * \param[out] polygons the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.
429  */
430  void
431  performReconstruction (std::vector<pcl::Vertices> &polygons);
432 
433  /** \brief The actual surface reconstruction method.
434  * \param[out] polygons the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.
435  */
436  bool
437  reconstructPolygons (std::vector<pcl::Vertices> &polygons);
438 
439  /** \brief Class get name method. */
440  std::string
441  getClassName () const { return ("GreedyProjectionTriangulation"); }
442 
443  /** \brief Forms a new triangle by connecting the current neighbor to the query point
444  * and the previous neighbor
445  * \param[out] polygons the polygon mesh to be updated
446  * \param[in] prev_index index of the previous point
447  * \param[in] next_index index of the next point
448  * \param[in] next_next_index index of the point after the next one
449  * \param[in] uvn_current 2D coordinate of the current point
450  * \param[in] uvn_prev 2D coordinates of the previous point
451  * \param[in] uvn_next 2D coordinates of the next point
452  */
453  void
454  connectPoint (std::vector<pcl::Vertices> &polygons,
455  const int prev_index,
456  const int next_index,
457  const int next_next_index,
458  const Eigen::Vector2f &uvn_current,
459  const Eigen::Vector2f &uvn_prev,
460  const Eigen::Vector2f &uvn_next);
461 
462  /** \brief Whenever a query point is part of a boundary loop containing 3 points, that triangle is created
463  * (called if angle constraints make it possible)
464  * \param[out] polygons the polygon mesh to be updated
465  */
466  void
467  closeTriangle (std::vector<pcl::Vertices> &polygons);
468 
469  /** \brief Get the list of containing triangles for each vertex in a PolygonMesh
470  * \param[in] polygonMesh the input polygon mesh
471  */
472  std::vector<std::vector<size_t> >
473  getTriangleList (const pcl::PolygonMesh &input);
474 
475  /** \brief Add a new triangle to the current polygon mesh
476  * \param[in] a index of the first vertex
477  * \param[in] b index of the second vertex
478  * \param[in] c index of the third vertex
479  * \param[out] polygons the polygon mesh to be updated
480  */
481  inline void
482  addTriangle (int a, int b, int c, std::vector<pcl::Vertices> &polygons)
483  {
484  triangle_.vertices.resize (3);
485  if (consistent_ordering_)
486  {
487  const PointInT p = input_->at (indices_->at (a));
488  const Eigen::Vector3f pv = p.getVector3fMap ();
489  if (p.getNormalVector3fMap ().dot (
490  (pv - input_->at (indices_->at (b)).getVector3fMap ()).cross (
491  pv - input_->at (indices_->at (c)).getVector3fMap ()) ) > 0)
492  {
493  triangle_.vertices[0] = a;
494  triangle_.vertices[1] = b;
495  triangle_.vertices[2] = c;
496  }
497  else
498  {
499  triangle_.vertices[0] = a;
500  triangle_.vertices[1] = c;
501  triangle_.vertices[2] = b;
502  }
503  }
504  else
505  {
506  triangle_.vertices[0] = a;
507  triangle_.vertices[1] = b;
508  triangle_.vertices[2] = c;
509  }
510  polygons.push_back (triangle_);
511  }
512 
513  /** \brief Add a new vertex to the advancing edge front and set its source point
514  * \param[in] v index of the vertex that was connected
515  * \param[in] s index of the source point
516  */
517  inline void
518  addFringePoint (int v, int s)
519  {
520  source_[v] = s;
521  part_[v] = part_[s];
522  fringe_queue_.push_back(v);
523  }
524 
525  /** \brief Function for ascending sort of nnAngle, taking visibility into account
526  * (angles to visible neighbors will be first, to the invisible ones after).
527  * \param[in] a1 the first angle
528  * \param[in] a2 the second angle
529  */
530  static inline bool
531  nnAngleSortAsc (const nnAngle& a1, const nnAngle& a2)
532  {
533  if (a1.visible == a2.visible)
534  return (a1.angle < a2.angle);
535  else
536  return a1.visible;
537  }
538  };
539 
540 } // namespace pcl
541 
542 #ifdef PCL_NO_PRECOMPILE
543 #include <pcl/surface/impl/gp3.hpp>
544 #endif
double getMaximumAngle() const
Get the parameter for distance based weighting of neighbors.
Definition: gp3.h:255
void setConsistentVertexOrdering(bool consistent_ordering)
Set the flag to order the resulting triangle vertices consistently (positive direction around normal)...
Definition: gp3.h:284
bool getConsistentVertexOrdering() const
Get the flag signaling consistently ordered triangle vertices.
Definition: gp3.h:288
std::vector< uint32_t > vertices
Definition: Vertices.h:19
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:44
double getMinimumAngle() const
Get the parameter for distance based weighting of neighbors.
Definition: gp3.h:244
void setMu(double mu)
Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point ...
Definition: gp3.h:208
bool isVisible(const Eigen::Vector2f &X, const Eigen::Vector2f &S1, const Eigen::Vector2f &S2, const Eigen::Vector2f &R=Eigen::Vector2f::Zero())
Returns if a point X is visible from point R (or the origin) when taking into account the segment bet...
Definition: gp3.h:67
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition: pcl_base.h:153
pcl::PointCloud< PointInT > PointCloudIn
Definition: gp3.h:150
boost::shared_ptr< KdTree< PointT > > Ptr
Definition: kdtree.h:70
boost::shared_ptr< const GreedyProjectionTriangulation< PointInT > > ConstPtr
Definition: gp3.h:141
double getMaximumSurfaceAngle() const
Get the maximum surface angle.
Definition: gp3.h:267
std::vector< int > getSFN() const
Get the sfn list.
Definition: gp3.h:305
bool getNormalConsistency() const
Get the flag for consistently oriented normals.
Definition: gp3.h:277
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
Definition: Vertices.h:14
std::vector< int > getPartIDs() const
Get the ID of each point after reconstruction.
Definition: gp3.h:300
boost::shared_ptr< PointCloud< PointInT > > Ptr
Definition: point_cloud.h:427
double getMu() const
Get the nearest neighbor distance multiplier.
Definition: gp3.h:212
double mu_
The nearest neighbor distance multiplier to obtain the final search radius.
Definition: gp3.h:313
double getSearchRadius() const
Get the sphere radius used for determining the k-nearest neighbors.
Definition: gp3.h:233
int nnn_
The maximum number of nearest neighbors accepted by searching.
Definition: gp3.h:319
void setMaximumNearestNeighbors(int nnn)
Set the maximum number of nearest neighbors to be searched for.
Definition: gp3.h:218
double minimum_angle_
The preferred minimum angle for the triangles.
Definition: gp3.h:322
pcl::KdTree< PointInT > KdTree
Definition: gp3.h:147
void setMinimumAngle(double minimum_angle)
Set the minimum angle each triangle should have.
Definition: gp3.h:240
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:428
GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points ...
Definition: gp3.h:137
bool consistent_
Set this to true if the normals of the input are consistently oriented.
Definition: gp3.h:331
int getMaximumNearestNeighbors() const
Get the maximum number of nearest neighbors to be searched for.
Definition: gp3.h:222
GreedyProjectionTriangulation()
Empty constructor.
Definition: gp3.h:164
MeshConstruction represents a base surface reconstruction class.
void setMaximumSurfaceAngle(double eps_angle)
Don&#39;t consider points for triangulation if their normal deviates more than this value from the query ...
Definition: gp3.h:263
double eps_angle_
Maximum surface angle.
Definition: gp3.h:328
pcl::KdTree< PointInT >::Ptr KdTreePtr
Definition: gp3.h:148
std::vector< int > getFFN() const
Get the ffn list.
Definition: gp3.h:309
void setSearchRadius(double radius)
Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulati...
Definition: gp3.h:229
void setMaximumAngle(double maximum_angle)
Set the maximum angle each triangle can have.
Definition: gp3.h:251
void setNormalConsistency(bool consistent)
Set the flag if the input normals are oriented consistently.
Definition: gp3.h:273
double maximum_angle_
The maximum angle for the triangles.
Definition: gp3.h:325
PointCloudConstPtr input_
The input point cloud dataset.
Definition: pcl_base.h:150
bool consistent_ordering_
Set this to true if the output triangle vertices should be consistently oriented. ...
Definition: gp3.h:334
double search_radius_
The nearest neighbors search radius for each point and the maximum edge length.
Definition: gp3.h:316
std::vector< int > getPointStates() const
Get the state of each point after reconstruction.
Definition: gp3.h:294
PointCloudIn::Ptr PointCloudInPtr
Definition: gp3.h:151
KdTree represents the base spatial locator class for kd-tree implementations.
Definition: kdtree.h:55
PointCloudIn::ConstPtr PointCloudInConstPtr
Definition: gp3.h:152
boost::shared_ptr< GreedyProjectionTriangulation< PointInT > > Ptr
Definition: gp3.h:140