Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_rib.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_RIB_H_
17 #define _WE_RIB_H_
18 
19 #include "a_curve_lin.h"
20 
21 #include <iostream>
22 #include <vector>
23 
30 class a_rib
31 {
32  public:
33  a_rib();
34  virtual ~a_rib();
35 
37  int size() const {return profiles_.size();}
39  a_curve_lin profile(double a) const;
41  void output_tri_open(std::ostream& o) const;
43  void output_tri_closed(std::ostream& o) const;
45  void output_vol(std::ostream& o) const;
46 
48  friend std::istream& operator>> (std::istream& i, a_rib& m);
50  friend std::ostream& operator<< (std::ostream& o, const a_rib& m);
51 
54 
55  protected:
58  int path_pos_;
59  double m2_;
61  std::vector<a_curve_lin *> profiles_;
63  std::vector<double> profile_pos_;
64  int ref(double a) const;
66  void output_pts(std::ostream& o, int& imax, int& jmax, bool is_closed_volume) const;
67  void output_pts_vol(std::ostream& o, int& imax, int& jmax) const;
68  a_curve_lin gia_profile(double a, int ref1, int ref2) const;
69  void invert();
70  void construct_profile_pos();
73  void init();
74 };
75 
76 #endif
a curve with linear interpolation
Definition: a_curve_lin.h:28
a rib
Definition: a_rib.h:31
void output_tri_closed(std::ostream &o) const
Definition: a_rib.cxx:421
int path_pos_
Definition: a_rib.h:58
std::vector< double > profile_pos_
Definition: a_rib.h:63
int ref(double a) const
Definition: a_rib.cxx:62
void output_vol(std::ostream &o) const
Definition: a_rib.cxx:470
std::vector< a_curve_lin * > profiles_
Definition: a_rib.h:61
void output_pts_vol(std::ostream &o, int &imax, int &jmax) const
Definition: a_rib.cxx:362
int size() const
Definition: a_rib.h:37
void extrapolate_1profile_setup()
Definition: a_rib.cxx:201
void invert()
Definition: a_rib.cxx:55
double m2_
Definition: a_rib.h:59
void output_pts(std::ostream &o, int &imax, int &jmax, bool is_closed_volume) const
Definition: a_rib.cxx:315
a_curve_lin gia_profile(double a, int ref1, int ref2) const
Definition: a_rib.cxx:127
virtual ~a_rib()
Definition: a_rib.cxx:28
void construct_profile_pos()
Definition: a_rib.cxx:71
void init()
Definition: a_rib.cxx:35
void extrapolate_profiles_setup()
Definition: a_rib.cxx:272
a_curve_lin profile(double a) const
Definition: a_rib.cxx:292
friend std::istream & operator>>(std::istream &i, a_rib &m)
Definition: a_rib.cxx:501
void output_tri_open(std::ostream &o) const
Definition: a_rib.cxx:389
a_rib()
Definition: a_rib.cxx:24
friend std::ostream & operator<<(std::ostream &o, const a_rib &m)
Definition: a_rib.cxx:523
a_curve_lin path_
Definition: a_rib.h:56