HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TinyObjLoader.h
Go to the documentation of this file.
1 //
2 // Copyright Contributors to the MaterialX Project
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 
6 #ifndef MATERIALX_TINYOBJLOADER_H
7 #define MATERIALX_TINYOBJLOADER_H
8 
9 /// @file
10 /// OBJ geometry format loader using the TinyObj library
11 
13 
15 
16 /// Shared pointer to a TinyObjLoader
17 using TinyObjLoaderPtr = std::shared_ptr<class TinyObjLoader>;
18 
19 /// @class TinyObjLoader
20 /// Wrapper for geometry loader to read in OBJ files using the TinyObj library.
22 {
23  public:
25  {
26  _extensions = { "obj", "OBJ" };
27  }
28  virtual ~TinyObjLoader() { }
29 
30  /// Create a new TinyObjLoader
31  static TinyObjLoaderPtr create() { return std::make_shared<TinyObjLoader>(); }
32 
33  /// Load geometry from disk
34  bool load(const FilePath& filePath, MeshList& meshList, bool texcoordVerticalFlip = false) override;
35 };
36 
38 
39 #endif
Definition: File.h:26
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
std::shared_ptr< class TinyObjLoader > TinyObjLoaderPtr
Shared pointer to a TinyObjLoader.
Definition: TinyObjLoader.h:17
virtual ~TinyObjLoader()
Definition: TinyObjLoader.h:28
static TinyObjLoaderPtr create()
Create a new TinyObjLoader.
Definition: TinyObjLoader.h:31
virtual bool load(const FilePath &filePath, MeshList &meshList, bool texcoordVerticalFlip=false)=0
#define MX_RENDER_API
Definition: Export.h:18
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
vector< MeshPtr > MeshList
List of meshes.
Definition: Mesh.h:233