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 MCNAPI_C bool _hasMaterial(::std::string const& materialName);
71
72 MCNAPI_C void _serialize(::Json::Value& root);
73
74 MCNAPI_C void _serializeBinaryData(::Json::Value& glTF);
75
76 MCNAPI_C void _serializeSampler(::Json::Value& root, ::glTF::Sampler const& sampler);
77
78 MCNAPI_C int addAccessor(::glTF::Accessor& accessor);
79
80 MCNAPI_C uint64 addBinaryBuffer(::Core::Path const& filePath, uchar const* data, uint64 size);
81
82 MCNAPI_C int addBuffer(::glTF::Buffer& buffer);
83
84 MCNAPI_C int addBufferView(::glTF::BufferView& bufferView);
85
86 MCNAPI_C int addImage(::glTF::Image& image);
87
88 MCNAPI_C int addMaterial(::glTF::Material& material);
89
90 MCNAPI_C int addMesh(::glTF::Mesh& mesh);
91
92 MCNAPI_C int addNode(::glTF::Node& node);
93
94 MCNAPI_C int addSampler(::glTF::Sampler& sampler);
95
96 MCNAPI_C int addScene(::glTF::Scene& scene);
97
98 MCNAPI_C int addTexture(::glTF::Texture& texture);
99
100 MCNAPI_C void serialize();
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCNAPI static ::std::string_view const& BINARY_EXTENSION();
107
108 MCNAPI_C static ::std::string_view const& GLB_BUFFER_URI();
109
110 MCNAPI static ::std::string_view const& GLB_EXTENSION();
111
112 MCNAPI static ::std::string_view const& GLTF_EXTENSION();
113 // NOLINTEND
114
115public:
116 // constructor thunks
117 // NOLINTBEGIN
118 MCNAPI_C void* $ctor(::Core::Path const& folderPath, ::std::string const& modelName);
119 // NOLINTEND
120
121public:
122 // destructor thunk
123 // NOLINTBEGIN
124 MCNAPI void $dtor();
125 // NOLINTEND
126
127public:
128 // vftables
129 // NOLINTBEGIN
130 MCNAPI static void** $vftable();
131 // NOLINTEND
132};
Definition Path.h:10
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_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