Flow123d  jenkins-Flow123d-linux-release-multijob-282
intersectionLocal.h
Go to the documentation of this file.
1 #ifndef IntersectionLocalH
2 #define IntersectionLocalH
3 
4 #include <iostream>
5 #include <vector>
6 #include <stdio.h>
7 
8 using namespace std;
9 
10 
11 //class IntersectionPoint - two vectors of local coords
13 public:
15  : coord1(c1), coord2(c2) {}
17  : coord1(LC.coord1), coord2(LC.coord2) {}
18  inline const std::vector<double> &el1_coord() const
19  {return coord1;}
20  inline const std::vector<double> &el2_coord() const
21  {return coord2;}
22  bool operator ==(const IntersectionPoint&);
23 protected:
26 
27  friend class IntersectionLocal;
29 };
30 IntersectionPoint *interpolate(const IntersectionPoint &A1, const IntersectionPoint &A2, double t);
31 
32 
34 public:
35  typedef enum {
39  } IntersectionType;
40 
41  IntersectionLocal(IntersectionType i_type);
44 
45  void add_local_coord(const std::vector<double> &coordin1, const std::vector<double> &coordin2); //add coords to i_points
46  void add_local_point(IntersectionPoint *InPoint);
47  void print(FILE *out_file);
48 
49  static int getNumInstances() {
51  }
52 
53  inline IntersectionType get_type() const
54  {return type; }
55  inline unsigned int n_points() const {
56  return i_points.size();
57  }
58  inline const IntersectionPoint * get_point(const unsigned int index) const
59  {
60  if (index >= i_points.size() ) return NULL;
61  else return i_points[index];
62  }
63 
64 private:
65  static int numberInstance;
66  int id;
67 
68  std::vector<IntersectionPoint *> i_points; //vektor ukazatelu na dvojice lokal. souradnic
70 
71 
72  int generateId();
73 };
74 
75 #endif /* IntersectionLocalH */
unsigned int n_points() const
std::vector< double > coord2
IntersectionPoint * interpolate(const IntersectionPoint &A1, const IntersectionPoint &A2, double t)
const IntersectionPoint * get_point(const unsigned int index) const
static int numberInstance
const std::vector< double > & el2_coord() const
IntersectionPoint(const std::vector< double > &c1, const std::vector< double > &c2)
std::vector< double > coord1
bool operator==(const Null &, const Null &)
static int getNumInstances()
const std::vector< double > & el1_coord() const
std::vector< IntersectionPoint * > i_points
IntersectionPoint(const IntersectionPoint &LC)
IntersectionType type
IntersectionType get_type() const