Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_shape_plane.h
Go to the documentation of this file.
1 /*
2  Copyright 2010-2020 Pierre SMARS (smars@yuntech.edu.tw)
3  This program is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 2 of the License, or
6  (at your option) any later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #ifndef _SHAPE_PLANE_H_
17 #define _SHAPE_PLANE_H_
18 
19 // .NAME a_shape_plane
20 // .SECTION Author
21 // Pierre Smars
22 #include "a_shape.h"
23 
25 class a_shape_plane : public a_shape
26 {
27  public:
29  virtual const std::string classname() const {return "a_plane";}
30  static const std::string help();
31  void normal(const a_point p);
32  a_point normal() const {return a_point(para_[0],para_[1],para_[2]);}
33  a_point origin() const; //plane point closest to origin
34  void normalise();
35  void p3pts(const a_point p1, const a_point p2, const a_point p3); //plane passes through 3 points
36  double dist() const {return para_[3];}
37  void dist(const double v) {para_[3] = v;}
38  a_point closest_point(const a_point p) const;
39  double dist_point(a_point p) const;
40  void random_hint(const std::vector<a_point>& pts);
41  void fit_cloud(std::vector<a_point>& pts, short int=1);
42  void export_3pts() const;
43  void export_triangles(const std::vector<a_point>& pts) const;
44  protected:
45 };
46 
47 #endif
void export_triangles(const std::vector< a_point > &pts) const
void fit_cloud(std::vector< a_point > &pts, short int=1)
void dist(const double v)
Definition: a_shape_plane.h:37
void p3pts(const a_point p1, const a_point p2, const a_point p3)
a_point closest_point(const a_point p) const
a_point origin() const
virtual const std::string classname() const
Definition: a_shape_plane.h:29
static const std::string help()
void export_3pts() const
a_point normal() const
Definition: a_shape_plane.h:32
void random_hint(const std::vector< a_point > &pts)
double dist_point(a_point p) const
double dist() const
Definition: a_shape_plane.h:36
shape
Definition: a_shape.h:32
vnl_vector< double > para_
Definition: a_shape.h:68
double v(const uint32_t step, const uint32_t n)
Definition: generate.cxx:42