MySources/mesh.hpp

32 lines
689 B
C++
Raw Normal View History

2021-03-15 18:04:29 +01:00
#ifndef MESH_HPP
#define MESH_HPP
2021-04-08 20:03:23 +02:00
#include <Eigen/Core>
2021-03-15 18:04:29 +01:00
#include <string>
2021-04-08 20:03:23 +02:00
class Mesh
{
protected:
2021-04-30 12:13:58 +02:00
std::string label{"empty_label"};
2021-03-15 18:04:29 +01:00
public:
virtual ~Mesh() = default;
virtual bool load(const std::string &filePath) { return false; }
2021-04-08 20:03:23 +02:00
virtual bool save(const std::string &filePath) { return false; }
2021-03-15 18:04:29 +01:00
std::string getLabel() const;
void setLabel(const std::string &newLabel);
2021-04-30 12:13:58 +02:00
void prependToLabel(const std::string &text);
2021-03-15 18:04:29 +01:00
};
inline std::string Mesh::getLabel() const { return label; }
inline void Mesh::setLabel(const std::string &newLabel) { label = newLabel; }
2021-04-30 12:13:58 +02:00
inline void Mesh::prependToLabel(const std::string &text)
{
label = text + label;
}
2021-03-15 18:04:29 +01:00
#endif // MESH_HPP