HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GLTF_Reader.h
Go to the documentation of this file.
1
#ifndef __GLTF_Reader_h__
2
#define __GLTF_Reader_h__
3
4
#include "
GLTFZ_API.h
"
5
#include "
GLTF_Types.h
"
6
7
#include <
UT/UT_StringHolder.h
>
8
#include <
UT/UT_UniquePtr.h
>
9
10
struct
CgltfImpl;
11
class
GLTF_ErrorManager
;
12
13
class
GLTFZ_API
GLTF_Reader
14
{
15
public
:
16
17
// We define the constructors/destructors in the source file to avoid having
18
// to pollute this header file with GLTF_CgltfImpl.h, which we want to keep
19
// hidden from users of the GLTFZ API.
20
GLTF_Reader
();
21
GLTF_Reader
(
const
char
*filePath);
22
~
GLTF_Reader
();
23
24
bool
loadFile(
GLTF_ErrorManager
& errors);
25
26
bool
closeFile();
27
28
bool
isOpen
()
const
{
return
myIsLoaded; }
29
30
bool
loadBuffer(
const
GLTF_Index
buf_idx,
31
GLTF_ErrorManager
& errors);
32
33
bool
loadAccessorData(
const
GLTF_Index
accessor_idx,
34
unsigned
char
** out_data,
35
GLTF_ErrorManager
& errors);
36
37
bool
loadAnimationData(
38
const
GLTF_Index
anim_idx,
39
GLTF_ErrorManager
& errors);
40
41
void
setFilePath
(
const
char
*
path
)
42
{ myFilePath =
path
; }
43
const
UT_StringHolder
&
filePath
()
const
{
return
myFilePath; }
44
45
CgltfImpl &getCgltfImpl()
const
;
46
47
private
:
48
// Set this to nullptr in the constructor so that we don't have to pull
49
// in the CgltfImpl header here.
50
UT_UniquePtr<CgltfImpl>
myCgltfImpl;
51
52
UT_StringHolder
myFilePath;
53
bool
myIsLoaded =
false
;
54
};
55
56
#endif // __GLTF_Reader_h__
GLTF_Reader
Definition:
GLTF_Reader.h:13
GLTF_Reader::isOpen
bool isOpen() const
Definition:
GLTF_Reader.h:28
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
UT_StringHolder
Definition:
UT_StringHolder.h:1009
GLTF_Reader::setFilePath
void setFilePath(const char *path)
Definition:
GLTF_Reader.h:41
GLTF_ErrorManager
Definition:
GLTF_ErrorManager.h:10
GLTF_Reader::filePath
const UT_StringHolder & filePath() const
Definition:
GLTF_Reader.h:43
GLTF_Index
std::size_t GLTF_Index
Definition:
GLTF_Types.h:6
GLTF_Types.h
UT_UniquePtr.h
UT_StringHolder.h
GLTFZ_API.h
GLTFZ_API
#define GLTFZ_API
Definition:
GLTFZ_API.h:37
GLTFZ
GLTF_Reader.h
Generated on Wed Sep 3 2025 02:33:31 for HDK by
1.8.6