The small3d library
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 
15 namespace 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 }
small3d::BinaryFile
Native model file loader. The model file loaded has to have been produced by converting a file in a s...
Definition: BinaryFile.hpp:30
Model.hpp
A 3D model class.
small3d::Model
A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...
Definition: Model.hpp:34
small3d::BinaryFile::getMeshNames
std::vector< std::string > getMeshNames() override
Get a list of the names of the meshes contained in the file.
Definition: BinaryFile.cpp:91
File.hpp
File parser virtual class.
small3d
Definition: BinaryFile.hpp:15
small3d::File
Abstract file parser class.
Definition: File.hpp:23
small3d::BinaryFile::load
void load(Model &model, const std::string &meshName) override
Load data from the Wavefront file into a Model.
Definition: BinaryFile.cpp:26