Points&Forces (survey)
Software tools facilitating the task of surveying architecture
Go to the documentation of this file.
1 /*
2 Copyright 2010-2016 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.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 GNU General Public License for more details.
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_FACE_2D4_H_
17 #define _A_FACE_2D4_H_
19 #include <vector>
21 #include "a_face.h"
22 #include "a_block.h"
23 #include "a_plane.h"
24 #include "a_triangle.h"
26 class a_face_2d4 : public a_face
27 {
28 public:
29  a_face_2d4(a_block * b, int ref_face) : a_face(b,ref_face) {};
31  double thickness() const;
33  double length() const;
35  virtual double S() const;
37  virtual a_point cl() const;
39  a_point v3d(const int i) const;
41  a_point nx() const;
43  a_point ny() const;
45  a_point normal() const;
47  double dyM() const;
49  double dym() const;
51  a_plane plane() const {return a_plane(v(0),v(1),v(0)+this->ny());}
53  void slide(const double& u, const double& v);
55  int ptsinplane(const a_plane& p) const;
57  void grow(const double& val);
59  double exrx() const;
61  double exry() const;
63  std::vector<a_triangle> triangles() const;
65  bool contains(const a_point& p) const;
67  a_segment segment(const int i) const;
69  a_segment intersect(const a_segment& s) const;
71  virtual int contacttype() const;
73  virtual a_point contactpoint() const;
75  virtual a_segment contactsegment() const;
77  virtual a_contact contactface() const;
78  //: input/output
79  // friend std::istream& operator>> (std::istream& i, a_face& b);
80  // friend std::ostream& operator<< (std::ostream& o, const a_face& b);
82 protected:
83 };
85 a_face_2d4 * cf_2d4(a_face * f);
86 const a_face_2d4 * cf_2d4(const a_face * f);
88 #endif
a_face_2d4 * cf_2d4(a_face *f)
Definition: a_face_2d4.cxx:26
virtual double S() const
Definition: a_face_2d4.cxx:64
std::vector< a_triangle > triangles() const
get 2 triangles defining the face
Definition: a_face_2d4.cxx:161
a_plane plane() const
plane defined by face
Definition: a_face_2d4.h:51
double dym() const
distance from center to min y
Definition: a_face_2d4.cxx:45
double exry() const
relative excentricity in y direction (between 0 and 1)
Definition: a_face_2d4.cxx:156
void slide(const double &u, const double &v)
slide the face in its plane
Definition: a_face_2d4.cxx:57
virtual int contacttype() const
contact type: (-2: no sister face, -1: not touching, 2: plane contact, 1: edge contact,...
Definition: a_face_2d4.cxx:180
double length() const
length of the face
Definition: a_face_2d4.cxx:50
a_point nx() const
direction of face
Definition: a_face_2d4.cxx:89
int ptsinplane(const a_plane &p) const
get number of points in plane
Definition: a_face_2d4.cxx:140
a_segment segment(const int i) const
get segment (world coordinate)
Definition: a_face_2d4.cxx:205
virtual a_point cl() const
centre of gravity of the face (in local coordinates)
Definition: a_face_2d4.cxx:69
bool contains(const a_point &p) const
check whether a point is inside the face
Definition: a_face_2d4.cxx:197
virtual a_segment contactsegment() const
return edge of contact if faces touch by one edge: hinge
Definition: a_face_2d4.cxx:293
a_face_2d4(a_block *b, int ref_face)
Definition: a_face_2d4.h:29
virtual a_point contactpoint() const
return point of contact if faces just touch by one point
Definition: a_face_2d4.cxx:263
a_segment intersect(const a_segment &s) const
intersection of face with a segment
Definition: a_face_2d4.cxx:222
a_point normal() const
normal to the face
Definition: a_face_2d4.cxx:133
virtual a_contact contactface() const
return common surface of contact
Definition: a_face_2d4.cxx:324
double thickness() const
thickness of the face
Definition: a_face_2d4.cxx:29
void grow(const double &val)
grow face
Definition: a_face_2d4.cxx:210
double dyM() const
distance from center to max y
Definition: a_face_2d4.cxx:40
a_point v3d(const int i) const
get vertex (world coordinate, 3D: 4 points: order v0-n, v0+n, v1+n, v1-n
Definition: a_face_2d4.cxx:76
a_point ny() const
normal to the vertices of the block
Definition: a_face_2d4.cxx:113
double exrx() const
relative excentricity in x direction (between 0 and 1)
Definition: a_face_2d4.cxx:151
Definition: a_face.h:33
a_point v(const int i) const
get vertex (in world coordinate)
Definition: a_face.cxx:289