Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_curve_lin.h
Go to the documentation of this file.
1 /*
2  Copyright 2010-2011 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 _WE_CURVE_LIN_H_
17 #define _WE_CURVE_LIN_H_
18 
19 #include "a_curve.h"
20 
27 class a_curve_lin : public a_curve
28 {
29  public:
30  a_curve_lin(double da = 1e-6);
31  a_curve_lin(const a_curve_lin&);
32  ~a_curve_lin();
33 
34  std::vector<double>& a() {return a_;}
35  const std::vector<double>& a() const {return a_;}
36  double ltot() const {return ltot_;}
37 
38  a_point operator()(double a) const; //interpolated value
39  a_point dx_axis(double a) const; // horizontal 2
40  a_point dy_axis(double a) const; // cross product 3
41  a_point dz_axis(double a) const; // tangent 1
42 
43  a_point tangent(double a) const; // tangent 1
44  a_point curvature_centre() const;
45  a_point curvature_centre(double a) const;
46  double curvature(double a) const;
47  a_curve_lin& extrapolate(double f1, double f2);
49 
50  friend a_curve_lin interpolate(const a_curve_lin& p1,const a_curve_lin& p2, double a);
51 
52  //input/output
53  friend std::istream& operator>> (std::istream& i, a_curve_lin& m);
54 
55  protected:
56  double ltot_;
57  std::vector<double> a_;
58 
59  a_curve& init();
60  int ref(double a) const;
61 };
62 
63 #endif
a curve with linear interpolation
Definition: a_curve_lin.h:28
a_point dx_axis(double a) const
int ref(double a) const
const std::vector< double > & a() const
Definition: a_curve_lin.h:35
a_point dz_axis(double a) const
a_curve_lin(double da=1e-6)
Definition: a_curve_lin.cxx:22
double ltot() const
Definition: a_curve_lin.h:36
std::vector< double > a_
Definition: a_curve_lin.h:57
a_curve_lin & extrapolate(double f1, double f2)
friend a_curve_lin interpolate(const a_curve_lin &p1, const a_curve_lin &p2, double a)
friend std::istream & operator>>(std::istream &i, a_curve_lin &m)
a_point curvature_centre() const
double curvature(double a) const
a_point operator()(double a) const
a_curve & init()
a_point tangent(double a) const
double ltot_
Definition: a_curve_lin.h:56
std::vector< double > & a()
Definition: a_curve_lin.h:34
a_point dy_axis(double a) const
sampled parametric function class (interface)
Definition: a_curve.h:35
a_curve & flatten()
Definition: a_curve.cxx:193
double da() const
Definition: a_curve.h:78
std::vector< a_point * > path
Definition: rib0.cxx:58