13CAD
CAD-like software based on C++, Qt and VTK.
 All Classes Files Functions Variables Friends
material.h
Go to the documentation of this file.
1 
8 #ifndef MATERIAL_H
9 #define MATERIAL_H
10 
11 #include <string>
12 
16 class Material
17 {
18  private:
22  int id;
23 
27  double density;
28 
32  std::string colour;
33 
37  std::string name;
38 
39  public:
40  Material(); // Empty initialisation case
41  Material(int id, double density, std::string colour, std::string name);
42  ~Material();
43 
44  // Accessors
45 
49  int getId();
50 
54  double getDensity();
55 
59  std::string getColour();
60 
64  std::string getName();
65 
66  // Mutators
67 
71  void setId(int id);
72 
76  void setDensity(double density);
77 
81  void setColour(std::string colour);
82 
86  void setName(std::string name);
87 
88  // Operator overloading
89  // Note: rhs stands for right hand side
90 
94  friend bool operator==(const Material &lhsMaterial, const Material &rhsMaterial);
95 };
96 
97 #endif /* MATERIAL_H */
void setName(std::string name)
Definition: material.cpp:64
void setDensity(double density)
Definition: material.cpp:54
friend bool operator==(const Material &lhsMaterial, const Material &rhsMaterial)
Definition: material.cpp:69
int getId()
Definition: material.cpp:29
void setId(int id)
Definition: material.cpp:49
void setColour(std::string colour)
Definition: material.cpp:59
std::string getColour()
Definition: material.cpp:39
Definition: material.h:16
std::string getName()
Definition: material.cpp:44
double getDensity()
Definition: material.cpp:34