HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CgltfLoader.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_CGLTFLOADER_H
7 #define MATERIALX_CGLTFLOADER_H
8 
9 /// @file
10 /// GLTF format loader using the Cgltf library
11 
13 
15 
16 /// Shared pointer to a GLTFLoader
17 using CgltfLoaderPtr = std::shared_ptr<class CgltfLoader>;
18 
19 /// @class CgltfLoader
20 /// Wrapper for loader to read in GLTF files using the Cgltf library.
22 {
23  public:
25  _debugLevel(0)
26  {
27  _extensions = { "glb", "GLB", "gltf", "GLTF" };
28  }
29  virtual ~CgltfLoader() { }
30 
31  /// Create a new loader
32  static CgltfLoaderPtr create() { return std::make_shared<CgltfLoader>(); }
33 
34  /// Load geometry from file path
35  bool load(const FilePath& filePath, MeshList& meshList, bool texcoordVerticalFlip = false) override;
36 
37  private:
38  unsigned int _debugLevel;
39 };
40 
42 
43 #endif
Definition: File.h:26
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
static CgltfLoaderPtr create()
Create a new loader.
Definition: CgltfLoader.h:32
std::shared_ptr< class CgltfLoader > CgltfLoaderPtr
Shared pointer to a GLTFLoader.
Definition: CgltfLoader.h:17
virtual ~CgltfLoader()
Definition: CgltfLoader.h:29
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