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