From 149b881d995df48ab7253edc583bfbbfd04a69e8 Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Mon, 17 May 2021 09:18:05 +0200 Subject: [PATCH] model --- lib/Ray/include/Model.hpp | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lib/Ray/include/Model.hpp diff --git a/lib/Ray/include/Model.hpp b/lib/Ray/include/Model.hpp new file mode 100644 index 00000000..afc4def4 --- /dev/null +++ b/lib/Ray/include/Model.hpp @@ -0,0 +1,49 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** Model +*/ + +#ifndef MODEL_HPP_ +#define MODEL_HPP_ + +#include "IRessource.hpp" +#include + +namespace RAY { + //! @brief Basic 3d Model type + class Model: public IRessource { + public: + //! @brief Create an model, loading a file + //! @param filePath: path to file to load + Model(const std::string &filePath); + + //! @brief Create an model, loading a file + //! @param mesh: mesh to load + Model(const Mesh &mesh); + + //! @brief A copy constructor + Model(const Model &model); + + //! @brief A model is assignable + Model& operator=(const Model &model) = default; + + ~Model() = default; + + //! @brief Load model from file (meshes and materials) + bool load(const std::string &filePath); + + //! @brief Load model from mesh (default materials) + bool load(const Mesh &mesh); + + //! @brief Unload model (including meshes) from memory (RAM and/or VRAM) + bool unload(); + + //! @brief Unload model (excluding meshes) from memory (RAM and/or VRAM) + bool unloadKeepMeshes(); + private: + ::Model _model; + }; +}; +#endif /* !Model_HPP_ */