Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_shape_line.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 _A_SHAPE_LINE_H_
17 #define _A_SHAPE_LINE_H_
18 
19 // .NAME a_shape_line
20 // .SECTION Author
21 // Pierre Smars
22 #include "a_shape.h"
23 
25 class a_shape_line : public a_shape
26 {
27  public:
29  const std::string classname() const {return "a_shape_line";}
30  static const std::string help();
31  a_point closest_point(const a_point p) const;
32  double dist_point(const a_point p) const;
33  void p2pts(const a_point p1, const a_point p2); //line passes through 2 points
34  a_point dir() const {return a_point(para_[0],para_[1],para_[2]);}
35  a_point orig() const {return a_point(para_[3],para_[4],para_[5]);}
36  void dir(const a_point pt) {para_[0] = pt.x(); para_[1] = pt.y(); para_[2] = pt.z();}
37  void orig(const a_point pt) {para_[3] = pt.x(); para_[4] = pt.y(); para_[5] = pt.z();}
38  void random_hint(const std::vector<a_point>& pts);
39  void fit_cloud(std::vector<a_point>& pts, short nl=1);
40  void export_line(const std::vector<a_point>& pts) const;
41 
42  protected:
43 };
44 #endif
45 
line shape
Definition: a_shape_line.h:26
void export_line(const std::vector< a_point > &pts) const
void dir(const a_point pt)
Definition: a_shape_line.h:36
static const std::string help()
void p2pts(const a_point p1, const a_point p2)
const std::string classname() const
Definition: a_shape_line.h:29
a_point orig() const
Definition: a_shape_line.h:35
void random_hint(const std::vector< a_point > &pts)
a_point dir() const
Definition: a_shape_line.h:34
a_point closest_point(const a_point p) const
void fit_cloud(std::vector< a_point > &pts, short nl=1)
void orig(const a_point pt)
Definition: a_shape_line.h:37
double dist_point(const a_point p) const
shape
Definition: a_shape.h:32
vnl_vector< double > para_
Definition: a_shape.h:68
Definition: stlb2stla.cxx:21
float y
Definition: stlb2stla.cxx:23
float z
Definition: stlb2stla.cxx:24
float x
Definition: stlb2stla.cxx:22