Flow123d  release_2.2.0-914-gf1a3a4f
tetrahedron.h
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file tetrahedron.h
15  * @brief
16  */
17 
18 #ifndef tetrahedronH
19 #define tetrahedronH
20 
21 #include "point.h"
22 #include "triangle.h"
23 
24 namespace ngh {
25 
26 class TTetrahedron {
27 private:
28  static int numberInstance;
29  int id;
30 
35 
40 
47 
48  double volume;
49 
50  int generateId();
51  void ComputeVolume();
52 
53 public:
54  TTetrahedron();
55  TTetrahedron(const TPoint&, const TPoint&, const TPoint&, const TPoint&);
56  ~TTetrahedron();
57 
58  const TTriangle &GetTriangle(int) const;
59  const TAbscissa &GetAbscissa(int) const;
60  const TPoint &GetPoint(int) const;
61 
62  double GetMin(int) const;
63  double GetMax(int) const;
64 
65  double GetVolume();
66 
67  void SetPoints(const TPoint& P1, const TPoint& P2, const TPoint& P3, const TPoint& P4);
68  bool IsInner(const TPoint&) const;
69 
70  static int getNumInstances() {
72  }
73 };
74 
75 } // namespace ngh
76 
77 #endif
TAbscissa * A3
Definition: tetrahedron.h:43
void SetPoints(const TPoint &P1, const TPoint &P2, const TPoint &P3, const TPoint &P4)
const TAbscissa & GetAbscissa(int) const
Definition: tetrahedron.cpp:94
bool IsInner(const TPoint &) const
Definition: abscissa.h:25
double GetMax(int) const
TAbscissa * A5
Definition: tetrahedron.h:45
static int numberInstance
Definition: tetrahedron.h:28
TAbscissa * A1
Definition: tetrahedron.h:41
const TPoint & GetPoint(int) const
TAbscissa * A2
Definition: tetrahedron.h:42
const TTriangle & GetTriangle(int) const
Definition: tetrahedron.cpp:80
TAbscissa * A6
Definition: tetrahedron.h:46
double GetMin(int) const
TAbscissa * A4
Definition: tetrahedron.h:44
static int getNumInstances()
Definition: tetrahedron.h:70