LeviLamina
Loading...
Searching...
No Matches
glTFExporter.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace Core { class Path; }
8namespace Json { class Value; }
9namespace glTF { struct Accessor; }
10namespace glTF { struct Buffer; }
11namespace glTF { struct BufferView; }
12namespace glTF { struct Image; }
13namespace glTF { struct Material; }
14namespace glTF { struct Mesh; }
15namespace glTF { struct Node; }
16namespace glTF { struct Sampler; }
17namespace glTF { struct Scene; }
18namespace glTF { struct Texture; }
19// clang-format on
20
21class glTFExporter {
22public:
23 // member variables
24 // NOLINTBEGIN
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 glTFExporter& operator=(glTFExporter const&);
53 glTFExporter(glTFExporter const&);
54 glTFExporter();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59#ifdef LL_PLAT_S
60 virtual ~glTFExporter() = default;
61#else // LL_PLAT_C
62 virtual ~glTFExporter();
63#endif
64
65 // NOLINTEND
66
67public:
68 // member functions
69 // NOLINTBEGIN
70#ifdef LL_PLAT_C
71 MCNAPI bool _hasMaterial(::std::string const& materialName);
72
73 MCNAPI void _serialize(::Json::Value& root);
74
75 MCNAPI void _serializeBinaryData(::Json::Value& glTF);
76
77 MCNAPI void _serializeSampler(::Json::Value& root, ::glTF::Sampler const& sampler);
78
79 MCNAPI int addAccessor(::glTF::Accessor& accessor);
80
81 MCNAPI uint64 addBinaryBuffer(::Core::Path const& filePath, uchar const* data, uint64 size);
82
83 MCNAPI int addBuffer(::glTF::Buffer& buffer);
84
85 MCNAPI int addBufferView(::glTF::BufferView& bufferView);
86
87 MCNAPI int addImage(::glTF::Image& image);
88
89 MCNAPI int addMaterial(::glTF::Material& material);
90
91 MCNAPI int addMesh(::glTF::Mesh& mesh);
92
93 MCNAPI int addNode(::glTF::Node& node);
94
95 MCNAPI int addSampler(::glTF::Sampler& sampler);
96
97 MCNAPI int addScene(::glTF::Scene& scene);
98
99 MCNAPI int addTexture(::glTF::Texture& texture);
100
101 MCNAPI glTFExporter(::Core::Path const& folderPath, ::std::string const& modelName);
102
103 MCNAPI void serialize();
104#endif
105 // NOLINTEND
106
107public:
108 // static variables
109 // NOLINTBEGIN
110 MCNAPI static ::std::string_view const& BINARY_EXTENSION();
111
112 MCNAPI static ::std::string_view const& GLB_BUFFER_URI();
113
114 MCNAPI static ::std::string_view const& GLB_EXTENSION();
115
116 MCNAPI static ::std::string_view const& GLTF_EXTENSION();
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122#ifdef LL_PLAT_C
123 MCNAPI void* $ctor(::Core::Path const& folderPath, ::std::string const& modelName);
124#endif
125 // NOLINTEND
126
127public:
128 // destructor thunk
129 // NOLINTBEGIN
130 MCNAPI void $dtor();
131 // NOLINTEND
132
133public:
134 // vftables
135 // NOLINTBEGIN
136 MCNAPI static void** $vftable();
137 // NOLINTEND
138};
Definition Path.h:17
Definition Value.h:16
static MCAPI ::std::string_view const & BINARY_EXTENSION()
static MCAPI void ** $vftable()
MCAPI void $dtor()
static MCAPI ::std::string_view const & GLB_BUFFER_URI()
static MCAPI ::std::string_view const & GLB_EXTENSION()
static MCAPI ::std::string_view const & GLTF_EXTENSION()
Definition buffer.h:5
Definition Accessor.h:12
Definition BufferView.h:7
Definition Buffer.h:7
Definition Image.h:12
Definition Material.h:12
Definition Mesh.h:12
Definition Node.h:12
Definition Sampler.h:7
Definition Scene.h:7
Definition Texture.h:12
Definition Alias.h:14
Definition serialize.h:11