Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_shape_circle.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_CIRCLE_H_
17 #define _A_SHAPE_CIRCLE_H_
18 
19 // .NAME a_shape_circle
20 // .SECTION Author
21 // Pierre Smars
22 #include "a_shape.h"
23 
25 class a_shape_circle : public a_shape
26 {
27  public:
29  virtual const std::string classname() const {return "a_shape_circle";}
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 p3pts(const a_point p1, const a_point p2, const a_point p3); //circle passes through 3 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  double radius() const {return para_[6];}
37  void dir(const a_point pt) {para_[0] = pt.x(); para_[1] = pt.y(); para_[2] = pt.z();}
38  void orig(const a_point pt) {para_[3] = pt.x(); para_[4] = pt.y(); para_[5] = pt.z();}
39  void radius(double r) {para_[6] = r;}
40  void random_hint(const std::vector<a_point>& pts);
41  void fit_cloud(std::vector<a_point>& pts, short nl=1);
42  void export_points(const unsigned int nseg, const std::vector<a_point>& pts) const;
43  void export_lines(const unsigned int nseg, const std::vector<a_point>& pts) const;
44 
45  protected:
46 };
47 #endif
48 
circle shape
a_point orig() const
double radius() const
a_point dir() const
void export_points(const unsigned int nseg, const std::vector< a_point > &pts) const
void export_lines(const unsigned int nseg, const std::vector< a_point > &pts) const
double dist_point(const a_point p) const
void fit_cloud(std::vector< a_point > &pts, short nl=1)
void dir(const a_point pt)
a_point closest_point(const a_point p) const
void radius(double r)
void random_hint(const std::vector< a_point > &pts)
virtual const std::string classname() const
void p3pts(const a_point p1, const a_point p2, const a_point p3)
void orig(const a_point pt)
static const std::string help()
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