MaterialX 1.39.1
Loading...
Searching...
No Matches
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
11
13
14MATERIALX_NAMESPACE_BEGIN
15
17using CgltfLoaderPtr = std::shared_ptr<class CgltfLoader>;
18
21class MX_RENDER_API CgltfLoader : public GeometryLoader
22{
23 public:
24 CgltfLoader() :
25 _debugLevel(0)
26 {
27 _extensions = { "glb", "GLB", "gltf", "GLTF" };
28 }
29 virtual ~CgltfLoader() { }
30
32 static CgltfLoaderPtr create() { return std::make_shared<CgltfLoader>(); }
33
35 bool load(const FilePath& filePath, MeshList& meshList, bool texcoordVerticalFlip = false) override;
36
37 private:
38 unsigned int _debugLevel;
39};
40
41MATERIALX_NAMESPACE_END
42
43#endif
std::shared_ptr< class CgltfLoader > CgltfLoaderPtr
Shared pointer to a GLTFLoader.
Definition: CgltfLoader.h:17
Geometry loader interfaces.
vector< MeshPtr > MeshList
List of meshes.
Definition: Mesh.h:233
Wrapper for loader to read in GLTF files using the Cgltf library.
Definition: CgltfLoader.h:22
bool load(const FilePath &filePath, MeshList &meshList, bool texcoordVerticalFlip=false) override
Load geometry from file path.
static CgltfLoaderPtr create()
Create a new loader.
Definition: CgltfLoader.h:32
A generic file path, supporting both syntactic and file system operations.
Definition: File.h:27
Base class representing a geometry loader.
Definition: GeometryHandler.h:28