ModelData.h
Go to the documentation of this file.
1 #ifndef B_MODEL_DATA_H
2 #define B_MODEL_DATA_H
3 
4 #include "GeometryData.h"
5 
9 class OBJLoader;
10 
11 class ModelData
12 {
13 public:
14  /* Typedefs */
15  typedef std::unordered_map< std::string, GeometryDataPtr > GroupMap;
16 
17  /* Functions */
18 
22 
28  ModelData(const std::string &fileName, bool flipT = false, bool flipZ = false);
29 
34  ModelData(bool flipT = false, bool flipZ = false);
35 
38  virtual ~ModelData();
39 
43  virtual ModelData &load(const std::string &fileName);
44 
47  virtual GroupMap getData() const;
48 
51  bool getFlipT() { return _flipT; }
52 
55  bool getFlipZ() { return _flipZ; }
56 
57 private:
58 
59  /* Variables */
60 
61  OBJLoader *_objLoader = nullptr;
62  bool _flipT = false;
63  bool _flipZ = false;
64 };
65 
66 #endif /* defined(B_MODEL_DATA_H) */
virtual ~ModelData()
Virtual destructor.
Definition: ModelData.cpp:27
virtual ModelData & load(const std::string &fileName)
Loads the model from a file.
Definition: ModelData.cpp:37
ModelData()
Constructor.
Definition: ModelData.h:21
bool getFlipT()
Returns true if the T axis of texture is flipped.
Definition: ModelData.h:51
virtual GroupMap getData() const
Returns the geometry groups.
Definition: ModelData.cpp:32
bool getFlipZ()
Returns true if the Z axis of the geometry is flipped.
Definition: ModelData.h:55
Definition: ModelData.h:11
std::unordered_map< std::string, GeometryDataPtr > GroupMap
Definition: ModelData.h:15
Loads and processes OBJ models and materials.
Definition: OBJLoader.h:16