Flow123d  jenkins-Flow123d-linux-release-multijob-282
triangle.h
Go to the documentation of this file.
1 #ifndef triangleH
2 #define triangleH
3 
4 #include "point.h"
5 #include "plain.h"
6 #include "abscissa.h"
7 #include "mesh/bounding_box.hh"
8 #include "mesh/elements.h"
9 
10 class TTriangle {
11 private:
12  static int numberInstance;
13  int id;
14 
18 
22 
24 
26 
27  double area;
28 
29  int generateId();
30 
31  void ComputeArea();
32 
33 public:
34  TTriangle();
35  TTriangle(const TTriangle&);
36  TTriangle(const TPoint&, const TPoint&, const TPoint&);
37  TTriangle(const Element&);
38  void update();
39 
40  ~TTriangle();
41 
42  TTriangle & operator =(const TTriangle &t);
43 
44  const TPlain &GetPlain() const;
45  const TAbscissa &GetAbscissa(int) const;
46  const TPoint &GetPoint(int) const;
47 
48  void SetPoints(const TPoint&, const TPoint&, const TPoint&);
49 
50  double GetMin(int) const;
51  double GetMax(int) const;
52 
53  double GetArea();
55 
56  bool IsInner(const TPoint&) const;
57 
58  static int getNumInstances() {
60  }
61 };
62 
63 #endif
64 
TAbscissa * A1
Definition: triangle.h:19
Bounding box in 3d ambient space.
Definition: bounding_box.hh:55
double GetMin(int) const
Definition: triangle.cpp:147
static int numberInstance
Definition: triangle.h:12
void ComputeArea()
Definition: triangle.cpp:125
TPoint X2
Definition: triangle.h:16
TPoint X3
Definition: triangle.h:17
Definition: plain.h:7
int id
Definition: triangle.h:13
int generateId()
Definition: triangle.cpp:8
double GetArea()
Definition: triangle.cpp:130
TTriangle & operator=(const TTriangle &t)
Definition: triangle.cpp:173
TPoint X1
Definition: triangle.h:15
bool IsInner(const TPoint &) const
Definition: triangle.cpp:187
const TPoint & GetPoint(int) const
Definition: triangle.cpp:99
Definition: point.h:10
void SetPoints(const TPoint &, const TPoint &, const TPoint &)
Definition: triangle.cpp:111
~TTriangle()
Definition: triangle.cpp:65
BoundingBox & get_bounding_box()
Definition: triangle.cpp:134
double GetMax(int) const
Definition: triangle.cpp:160
const TPlain & GetPlain() const
Definition: triangle.cpp:81
double area
Definition: triangle.h:27
TAbscissa * A3
Definition: triangle.h:21
TAbscissa * A2
Definition: triangle.h:20
static int getNumInstances()
Definition: triangle.h:58
BoundingBox boundingBox
Definition: triangle.h:25
const TAbscissa & GetAbscissa(int) const
Definition: triangle.cpp:85
void update()
Definition: triangle.cpp:55
TPlain * pl
Definition: triangle.h:23