The small3d library
Tiny C++ 3D game development library for Win/MacOS/Linux/FreeBSD
Loading...
Searching...
No Matches
File.hpp
Go to the documentation of this file.
1
10#pragma once
11
12#include <string>
13#include <vector>
14
15namespace small3d {
16
17 class Model;
18
23 class File {
24 private:
25 File(); // No default constructor
26
27 // Forbid moving and copying
28 File(File const&) = delete;
29 void operator=(File const&) = delete;
30 File(File&&) = delete;
31 void operator=(File&&) = delete;
32
33 protected:
37 std::string fullPath = "";
38
39 public:
44 explicit File(const std::string& fileLocation);
45
51 virtual void load(Model& model, const std::string& meshName) = 0;
52
58 virtual std::vector<std::string> getMeshNames() = 0;
59
60 };
61}
Abstract file parser class.
Definition File.hpp:23
virtual std::vector< std::string > getMeshNames()=0
Get a list of the names of the meshes contained in the file.
virtual void load(Model &model, const std::string &meshName)=0
Load data from the file into a Model.
std::string fullPath
The path to the file being parsed.
Definition File.hpp:37
A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...
Definition Model.hpp:34
Definition BinaryFile.hpp:15