13CAD
CAD-like software based on C++, Qt and VTK.
 All Classes Files Functions Variables Friends
cell.h
Go to the documentation of this file.
1 
9 #ifndef CELL_H
10 #define CELL_H
11 
12 #include <vector>
13 #include "vector3d.h"
14 #include "material.h"
15 
19 class Cell
20 {
21  protected:
25  std::vector<Vector3D> vertices;
26 
31 
32  public:
33  Cell();
34  ~Cell();
35 
36  // Accessors
37 
41  virtual double getVolume();
42 
46  double getMass();
47 
51  std::vector<Vector3D> getVertices();
52 
57 
62 };
63 
67 class Pyramid : public Cell
68 {
69  public:
70  Pyramid();
71  Pyramid(std::vector<Vector3D> &vertices, Material &material);
72  ~Pyramid();
73 
74  // Accessors
75  virtual double getVolume();
76 };
77 
81 class Hexahedron : public Cell
82 {
83  public:
84  Hexahedron();
85  Hexahedron(std::vector<Vector3D> &vertices, Material &material);
86  ~Hexahedron();
87 
88  // Accessors
89  virtual double getVolume();
90 };
91 
95 class Tetrahedron : public Cell
96 {
97  public:
98  Tetrahedron();
99  Tetrahedron(std::vector<Vector3D> &vertices, Material &material);
100  ~Tetrahedron();
101 
102  // Accessors
103  virtual double getVolume();
104 };
105 
106 #endif /* CELL_H */
std::vector< Vector3D > vertices
Definition: cell.h:25
Definition: cell.h:19
Header file for the Material class.
Material material
Definition: cell.h:30
Definition: cell.h:95
virtual double getVolume()
Definition: cell.cpp:117
Header file for the Vector3D class.
Definition: cell.h:67
std::vector< Vector3D > getVertices()
Definition: cell.cpp:36
Definition: vector3d.h:17
double getMass()
Definition: cell.cpp:23
Material getMaterial()
Definition: cell.cpp:31
Definition: material.h:16
Definition: cell.h:81
virtual double getVolume()
Definition: cell.cpp:18
Vector3D getCentre()
Definition: cell.cpp:41
virtual double getVolume()
Definition: cell.cpp:75
virtual double getVolume()
Definition: cell.cpp:99