1 #ifndef INC_KURUSVIEW_MMODEL_H 2 #define INC_KURUSVIEW_MMODEL_H 16 std::vector<MVector> vectors;
18 std::vector<std::shared_ptr<MMaterial>> materials;
31 explicit MModel(
const std::string &filePath);
42 void loadModel(
const std::string &filePath);
48 void saveModel(
const std::string &filePath);
84 std::vector<std::shared_ptr<MCell>>
cells;
86 std::vector<std::shared_ptr<MMaterial>> getMaterials();
88 std::vector<MVector> getVectors();
90 std::vector<std::shared_ptr<MCell>> getCells();
92 size_t getVectorCount();
94 size_t getMaterialCount();
98 #endif //INC_KURUSVIEW_MMODEL_H double calcWeight()
calcWeight - Calculates the weight of the model
Definition: MModel.cpp:202
Header file for MVector class.
Header file for MCell base class.
~MModel()=default
~MModel - Default Destructor
size_t getCellCount()
getCellCount - Displays the number of cells and the type of each cell
Definition: MModel.cpp:176
MModel()=default
MModel - Default Constructor.
MModel - This object is responsible for reading and writing model entities to .mod data files...
Definition: MModel.h:13
void loadModel(const std::string &filePath)
loadModel - Loads a model from a VTK style data file
Definition: MModel.cpp:22
double calcVolume()
calcVolume - Calculates the volume of the model
Definition: MModel.cpp:194
std::vector< std::shared_ptr< MCell > > cells
cells - List of all the cells in the model
Definition: MModel.h:84
MVector calcCentre()
calcCentre - Calculates the centre of the model
Definition: MModel.cpp:181
void displayVertexCount()
displayVertexCount - Calculates the number of vertices and displays them
Definition: MModel.cpp:172
void saveModel(const std::string &filePath)
saveModel - Saves the currently loaded model to a VTK style data file
Definition: MModel.cpp:141