LeviLamina
Loading...
Searching...
No Matches
GeometryGroup.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/threading/UniqueLock.h"
9#include "mc/util/json_util/JsonSchemaObjectNode.h"
10
11// auto generated forward declare list
12// clang-format off
13class Geometry;
14class GeometryInfo;
16class GeometryPtr;
17class HashedString;
21class SemVersion;
22struct ModelParent;
24namespace Bedrock::Threading { class Mutex; }
25namespace Json { class Value; }
26namespace JsonUtil { class EmptyClass; }
27// clang-format on
28
30 public ::std::enable_shared_from_this<::GeometryGroup> {
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::UntypedStorage<8, 64> mUnk69fa9e;
35 ::ll::UntypedStorage<8, 80> mUnk15a0e0;
36 ::ll::UntypedStorage<8, 8> mUnk89a968;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 GeometryGroup& operator=(GeometryGroup const&);
42 GeometryGroup(GeometryGroup const&);
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ~GeometryGroup() /*override*/;
48 // NOLINTEND
49
50public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI GeometryGroup();
54
55 MCAPI ::std::shared_ptr<::GeometryInfo>
56 _findOrAddGeometryInfo(::HashedString const& name, ::Bedrock::Threading::UniqueLock<::Bedrock::Threading::Mutex>&);
57
58 MCAPI void _loadModelsAsync(
59 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
60 ::std::shared_ptr<::GeometryInheritanceTree> inheritance,
61 ::std::function<void(::std::weak_ptr<::GeometryGroup>, ::std::string const&, ::ModelParent const&)>
62 loadModelFunction,
63 ::std::function<void()> mainThreadCallback
64 );
65
66 MCAPI void addGeometries(
67 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
68 ::Json::Value& geometryData,
69 ::MinEngineVersion const& minEngineVersion,
70 ::std::function<void()> mainThreadCallback,
71 bool isAsync
72 );
73
74 MCAPI ::GeometryPtr getGeometry(::HashedString const& geometryName);
75
76 MCAPI ::std::shared_ptr<::GeometryInfo> getGeometryInfo(::HashedString const& name);
77
78 MCFOLD ::std::weak_ptr<::GeometryGroup> getWeakPtrToThis();
79
80 MCAPI void loadGeometriesAsync(
81 ::ResourcePackManager& resourcePackManager,
82 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
83 ::std::function<void(::std::weak_ptr<::GeometryGroup>, ::std::string const&, ::ModelParent const&)>
84 loadModelFunction,
85 ::std::function<void(::Json::Value&)> postLoadFixup
86 );
87
88 MCAPI void loadModelPackFromStringSync(
89 ::std::string const& packName,
90 ::std::string const& content,
91 ::MinEngineVersion const& minEngineVersion
92 );
93
94 MCAPI void removeGeometry(::HashedString const& name);
95
96 MCAPI void setGeometry(::HashedString const& name, ::std::unique_ptr<::Geometry>&& ptr);
97 // NOLINTEND
98
99public:
100 // static functions
101 // NOLINTBEGIN
102 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
103 _buildGeometryFileSchema_pre_v1_8();
104
105 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
106 _buildGeometryFileSchema_v1_12();
107
108 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
109 _buildGeometryFileSchema_v1_14();
110
111 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
112 _buildGeometryFileSchema_v1_16();
113
114 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
115 _buildGeometryFileSchema_v1_19_30();
116
117 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
118 _buildGeometryFileSchema_v1_21();
119
120 MCAPI static ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::GeometryGroup>>
121 _buildGeometryFileSchema_v1_8();
122
123 MCAPI static void _buildInheritanceTree(
124 ::std::string const& fileName,
125 ::std::string const& sourceFilePathWithExtension,
126 ::std::string const& fileContent,
127 ::MinEngineVersion const& minEngineVersion,
128 ::GeometryInheritanceTree& inheritance,
129 bool isFromBaseGamePack,
130 bool requireMinecraftNamespace,
131 ::std::function<void(::Json::Value&)> postLoadFixup
132 );
133
134 MCAPI static void _buildInheritanceTree(
135 ::std::string const& sourceFilePathWithExtension,
136 ::std::string const& value,
137 ::Json::Value& minEngineVersion,
138 ::MinEngineVersion const& inheritance,
139 ::GeometryInheritanceTree& isFromBaseGamePack,
140 bool requireMinecraftNamespace,
141 bool postLoadFixup,
142 ::std::function<void(::Json::Value&)>
143 );
144
145 MCAPI static ::std::pair<::std::string, ::std::string> _getParent(::std::string const& fullName);
146
147 MCAPI static bool checkVersionlessName(::std::string_view name, ::std::string_view versionlessGeoName);
148
149 MCAPI static bool isValidGeometryIdentifier(::Json::Value const& name);
150
151 MCAPI static bool isValidMinecraftNamespaceGeometryIdentifier(::std::string const& identifier);
152
153 MCAPI static bool isValidOptionalNamespaceGeometryIdentifier(::Json::Value const& name);
154
155 MCAPI static void loadModel(
156 ::std::weak_ptr<::GeometryGroup> weakGeometryGroup,
157 ::std::string const& pascalCaseName,
158 ::ModelParent const& mp
159 );
160
161 MCAPI static void loadModelExt(
162 ::std::weak_ptr<::GeometryGroup> weakGeometryGroup,
163 ::std::string const& pascalCaseName,
164 ::ModelParent const& mp,
165 int texw,
166 int texh,
167 ::TextureUVCoordinateSet const& uvOffset,
168 bool clearSkinAdjustmentsBitmask
169 );
170
171 MCAPI static void upgradeMirrorMemberToV1_12(::Json::Value& bone);
172
173 MCAPI static void upgradeResetMemberToV1_12(::Json::Value& bone);
174
175 MCAPI static bool upgradeToV1_12(
176 ::Json::Value& root,
177 ::SemVersion const& fileVersion,
178 ::MinEngineVersion const& minEngineVersion,
179 bool& hasBeenValidated
180 );
181
182 MCAPI static bool upgradeToV1_14(
183 ::Json::Value& root,
184 ::SemVersion const& fileVersion,
185 ::MinEngineVersion const& minEngineVersion,
186 bool& hasBeenValidated
187 );
188
189 MCAPI static bool upgradeToV1_16(
190 ::Json::Value& root,
191 ::SemVersion const& fileVersion,
192 ::MinEngineVersion const& minEngineVersion,
193 bool& hasBeenValidated
194 );
195
196 MCAPI static bool upgradeToV1_19_30(
197 ::Json::Value& root,
198 ::SemVersion const& fileVersion,
199 ::MinEngineVersion const& minEngineVersion,
200 bool& hasBeenValidated
201 );
202
203 MCAPI static bool upgradeToV1_21(
204 ::Json::Value& root,
205 ::SemVersion const& fileVersion,
206 ::MinEngineVersion const& minEngineVersion,
207 bool& hasBeenValidated
208 );
209
210 MCAPI static bool validateFormatVersion(::SemVersion& fileVersion, ::Json::Value const& value);
211 // NOLINTEND
212
213public:
214 // constructor thunks
215 // NOLINTBEGIN
216 MCAPI void* $ctor();
217 // NOLINTEND
218
219public:
220 // destructor thunk
221 // NOLINTBEGIN
222 MCAPI void $dtor();
223 // NOLINTEND
224
225public:
226 // vftables
227 // NOLINTBEGIN
228 MCNAPI static void** $vftable();
229 // NOLINTEND
230};
Definition EnableNonOwnerReferences.h:7
Definition Mutex.h:10
Definition GeometryGroup.h:5
static MCAPI void ** $vftable()
Definition GeometryInfo.h:5
Definition GeometryInheritanceTree.h:5
Definition GeometryPtr.h:5
Definition Geometry.h:5
Definition HashedString.h:5
Definition EmptyClass.h:7
Definition Value.h:16
Definition MinEngineVersion.h:15
Definition ResourceLoadManager.h:19
Definition ResourcePackManager.h:35
Definition SemVersion.h:15
Definition ModelParent.h:5
Definition TextureUVCoordinateSet.h:5