The small3d library
Tiny C++ 3D game development library for Win/MacOS/Linux/FreeBSD
Loading...
Searching...
No Matches
BinaryFile.hpp
Go to the documentation of this file.
1
10#pragma once
11#include <vector>
12#include "File.hpp"
13#include "Model.hpp"
14
15namespace small3d {
16
30 class BinaryFile : public File {
31
32 private:
33
34
35 BinaryFile(); // No default constructor
36
37 // Forbid moving and copying
38 BinaryFile(BinaryFile const&) = delete;
39 void operator=(BinaryFile const&) = delete;
40 BinaryFile(BinaryFile&&) = delete;
41 void operator=(BinaryFile&&) = delete;
42
43 public:
48 explicit BinaryFile(const std::string& fileLocation);
49
55 void load(Model& model, const std::string& meshName) override;
56
62 std::vector<std::string> getMeshNames() override;
63
64 };
65}
File parser virtual class.
A 3D model class.
Native model file loader. The model file loaded has to have been produced by converting a file in a s...
Definition BinaryFile.hpp:30
std::vector< std::string > getMeshNames() override
Get a list of the names of the meshes contained in the file.
Definition BinaryFile.cpp:91
void load(Model &model, const std::string &meshName) override
Load data from the Wavefront file into a Model.
Definition BinaryFile.cpp:26
Abstract file parser class.
Definition File.hpp:23
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