LeviLamina
Loading...
Searching...
No Matches
Geometry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/model/FitToFrame.h"
7#include "mc/client/model/geom/Cube.h"
8#include "mc/client/model/geom/QuadUVRotation.h"
9#include "mc/client/model/geom/TextureOffset.h"
10#include "mc/deps/core/math/Vec2.h"
11#include "mc/deps/core/math/Vec3.h"
12#include "mc/deps/core/sem_ver/SemVersion.h"
13#include "mc/resources/MinEngineVersion.h"
14#include "mc/world/actor/player/SkinAdjustments.h"
15
16// auto generated forward declare list
17// clang-format off
22namespace Json { class Value; }
23// clang-format on
24
25class Geometry {
26public:
27 // Geometry inner types declare
28 // clang-format off
30 struct Box;
31 struct NodeVertex;
32 struct NodePolyMesh;
33 struct NodeTextureMesh;
34 struct Node;
35 // clang-format on
36
37 // Geometry inner types define
38 struct ItemDisplayTransform {};
39
40 struct Box {
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<1, 1, bool> mMirror;
45 ::ll::TypedStorage<4, 12, ::Vec3> mFrom;
46 ::ll::TypedStorage<4, 12, ::Vec3> mSize;
47 ::ll::TypedStorage<4, 12, ::Vec3> mRotation;
48 ::ll::TypedStorage<4, 12, ::Vec3> mPivot;
49 ::ll::TypedStorage<8, 16, ::TextureOffset> mTex;
50 ::ll::TypedStorage<4, 144, ::std::array<::Cube::FaceUVData, 6>> mFaceUVs;
51 ::ll::TypedStorage<4, 4, float> mInflate;
52 ::ll::TypedStorage<1, 1, bool> mUsesFaceUVs;
53 // NOLINTEND
54
55 public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI void _boxFaceUVToJson(
59 ::Json::Value& uvNode,
60 uchar facing,
61 ::std::string const& faceName,
62 ::std::vector<::std::string> const& materialInstanceList
63 ) const;
64
65 MCAPI void toJson(::Json::Value& root, ::std::vector<::std::string> const& materialInstanceList) const;
66 // NOLINTEND
67 };
68
69 struct NodeVertex {
70 public:
71 // member variables
72 // NOLINTBEGIN
73 ::ll::TypedStorage<4, 4, uint> mPositionIndex;
74 ::ll::TypedStorage<4, 4, uint> mNormalIndex;
75 ::ll::TypedStorage<4, 4, uint> mUVIndex;
76 // NOLINTEND
77
78 public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI void toJson(::Json::Value& root) const;
82 // NOLINTEND
83 };
84
85 struct NodePolyMesh {
86 public:
87 // member variables
88 // NOLINTBEGIN
89 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mPositions;
90 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mNormals;
91 ::ll::TypedStorage<8, 24, ::std::vector<::Vec2>> mUVs;
92 ::ll::TypedStorage<8, 24, ::std::vector<::std::array<::Geometry::NodeVertex, 3>>> mTris;
93 ::ll::TypedStorage<8, 24, ::std::vector<::std::array<::Geometry::NodeVertex, 4>>> mQuads;
94 ::ll::TypedStorage<1, 1, bool> mAreUVsNormalized;
95 // NOLINTEND
96
97 public:
98 // prevent constructor by default
99 NodePolyMesh();
100
101 public:
102 // member functions
103 // NOLINTBEGIN
104 MCAPI NodePolyMesh(::Geometry::NodePolyMesh const&);
105
106 MCAPI ::Geometry::NodePolyMesh& operator=(::Geometry::NodePolyMesh&&);
107
108 MCAPI ::Geometry::NodePolyMesh& operator=(::Geometry::NodePolyMesh const&);
109
110 MCAPI void toJson(::Json::Value& root) const;
111
112 MCAPI ~NodePolyMesh();
113 // NOLINTEND
114
115 public:
116 // constructor thunks
117 // NOLINTBEGIN
118 MCAPI void* $ctor(::Geometry::NodePolyMesh const&);
119 // NOLINTEND
120
121 public:
122 // destructor thunk
123 // NOLINTBEGIN
124 MCAPI void $dtor();
125 // NOLINTEND
126 };
127
128 struct NodeTextureMesh {
129 public:
130 // member variables
131 // NOLINTBEGIN
132 ::ll::TypedStorage<8, 32, ::std::string> mTextureName;
133 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
134 ::ll::TypedStorage<4, 12, ::Vec3> mLocalPivot;
135 ::ll::TypedStorage<4, 12, ::Vec3> mRotation;
136 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
137 ::ll::TypedStorage<1, 1, bool> mUsePixelDepth;
138 // NOLINTEND
139
140 public:
141 // prevent constructor by default
142 NodeTextureMesh();
143
144 public:
145 // member functions
146 // NOLINTBEGIN
147 MCAPI explicit NodeTextureMesh(::std::string const& textureName);
148
149 MCAPI void toJson(::Json::Value& root) const;
150 // NOLINTEND
151
152 public:
153 // constructor thunks
154 // NOLINTBEGIN
155 MCAPI void* $ctor(::std::string const& textureName);
156 // NOLINTEND
157 };
158
159 struct Node {
160 public:
161 // member variables
162 // NOLINTBEGIN
163 ::ll::TypedStorage<8, 16, ::std::set<::std::string>> mMixedCaseNames;
164 ::ll::TypedStorage<1, 1, bool> mMirror;
165 ::ll::TypedStorage<1, 1, bool> mNeverRender;
166 ::ll::TypedStorage<4, 12, ::Vec3> mPivot;
167 ::ll::TypedStorage<4, 12, ::Vec3> mRot;
168 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
169 ::ll::TypedStorage<4, 12, ::Vec3> mBindPoseRotation;
170 ::ll::TypedStorage<4, 4, float> mInflate;
171 ::ll::TypedStorage<1, 1, bool> mPivotSubtractsParentPivot;
172 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::Box>> mBoxes;
173 ::ll::TypedStorage<8, 32, ::std::string> mParentName;
174 ::ll::TypedStorage<8, 32, ::std::string> mBoneBindingExpression;
175 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPartLocator>> mLocators;
176 ::ll::TypedStorage<8, 128, ::Geometry::NodePolyMesh> mMesh;
177 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::NodeTextureMesh>> mTextureMeshes;
178 ::ll::TypedStorage<1, 1, bool> mDebug;
179 ::ll::TypedStorage<4, 4, uint> mSkinnedMeshGroupIdentifier;
180 ::ll::TypedStorage<8, 24, ::SemVersion> mSourceFileVersion;
181 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mSourceMinEngineVersion;
182 // NOLINTEND
183
184 public:
185 // member functions
186 // NOLINTBEGIN
187 MCAPI Node();
188
189 MCAPI Node(::Geometry::Node const&);
190
191 MCAPI void
192 _textureMeshToJson(::std::vector<::Geometry::NodeTextureMesh> const& textureMeshes, ::Json::Value& node) const;
193
194 MCAPI void addLocator(
195 ::std::string const& name,
196 ::std::string const& boneName,
197 ::Vec3 const& localOffset,
198 bool ignoreInheritedScale,
199 bool errorIfIdenticalLocatorAlreadyExists
200 );
201
202 MCAPI ::Geometry::Node& operator=(::Geometry::Node const&);
203
204 MCAPI void toJson(::Json::Value& root, ::std::vector<::std::string> const& materialInstanceList) const;
205
206 MCAPI ~Node();
207 // NOLINTEND
208
209 public:
210 // constructor thunks
211 // NOLINTBEGIN
212 MCAPI void* $ctor();
213
214 MCAPI void* $ctor(::Geometry::Node const&);
215 // NOLINTEND
216
217 public:
218 // destructor thunk
219 // NOLINTBEGIN
220 MCAPI void $dtor();
221 // NOLINTEND
222 };
223
224public:
225 // member variables
226 // NOLINTBEGIN
227 ::ll::TypedStorage<4, 4, ::SkinAdjustments> mSkinAdjustments;
228 ::ll::TypedStorage<4, 8, ::Vec2> mRenderDim;
229 ::ll::TypedStorage<4, 12, ::Vec3> mRenderDimOffset;
230 ::ll::TypedStorage<4, 12, ::Vec3> mLeashOffset;
231 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
232 ::ll::TypedStorage<1, 1, bool> mUseModelData;
233 ::ll::TypedStorage<1, 1, bool> mModified;
234 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::ItemDisplayTransform>> mItemTransforms;
235 ::ll::TypedStorage<1, 1, ::FitToFrame> mFitGuiItemToFrame;
236 ::ll::TypedStorage<4, 8, ::Vec2> mTextureDimensions;
237 ::ll::TypedStorage<8, 32, ::std::string> mSourceFilePathWithExtension;
238 ::ll::TypedStorage<8, 32, ::std::string> mSerializableName;
239 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::Geometry::Node>> mNodes;
240 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mMinEngineVersion;
241 ::ll::TypedStorage<1, 1, bool> mIsFromBaseGamePack;
242 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMaterialInstanceList;
243 // NOLINTEND
244
245public:
246 // prevent constructor by default
247 Geometry();
248
249public:
250 // member functions
251 // NOLINTBEGIN
252 MCAPI Geometry(
253 ::std::string const& serializableName,
254 ::std::string const& sourceFilePathWithExtension,
255 bool isFromBaseGamePack,
256 int texw,
257 int texh
258 );
259
260 MCAPI Geometry(
261 ::std::string const& serializableName,
262 ::std::string const& sourceFilePathWithExtension,
263 ::Geometry const& source,
264 bool isFromBaseGamePack,
265 int texw,
266 int texh
267 );
268
269 MCAPI void _convertPreV1_8MobArmorOffsetsToLocators();
270
271 MCAPI void _fixEnderDragonLegacyBones(::Geometry::Node& newNode, ::std::string const& name);
272
273 MCAPI void _fixPreDataDrivenMobGeometry(
274 ::std::string const& name,
275 ::std::vector<::JsonValueHierarchy> const& bones,
276 ::JsonValueHierarchy& sourceNode,
277 ::Geometry::Node* newNode
278 );
279
280 MCAPI void
281 _parseBones(::JsonValueHierarchy const& root, bool applyBindPoseRotation, ::TextureUVCoordinateSet const& uvOffset);
282
283 MCAPI void _parseBoxFaceUV(
284 ::Geometry::Box& box,
285 ::Json::Value const& uvNode,
286 uchar facing,
287 ::std::string const& faceName,
288 ::Vec2 const& defaultUVSize,
289 ::TextureUVCoordinateSet const& uvOffset
290 );
291
292 MCAPI void
293 _parseBoxFaceUVs(::Geometry::Box& box, ::Json::Value const& uvNode, ::TextureUVCoordinateSet const& uvOffset);
294
295 MCAPI void _parseItemDisplayTransform(::Json::Value const& itemTransformNode, ::std::string const& transformName);
296
297 MCFOLD ::std::vector<::std::string> const& getMaterialInstanceList() const;
298
299 MCAPI ::Geometry::Node const* getNode(::std::string_view name) const;
300
301 MCFOLD ::std::map<::std::string, ::Geometry::Node> const& getNodes() const;
302
303 MCFOLD ::Vec2 const& getTextureDimensions() const;
304
305 MCFOLD bool isFromBaseGamePack() const;
306
307 MCAPI void
308 parse(::JsonValueHierarchy const& root, bool applyBindPoseRotation, ::TextureUVCoordinateSet const& uvOffset);
309
310 MCAPI void toJson(::Json::Value& root) const;
311
312 MCAPI ~Geometry();
313 // NOLINTEND
314
315public:
316 // static functions
317 // NOLINTBEGIN
318 MCAPI static ::QuadUVRotation _parseUvRotation(::Json::Value const& value);
319 // NOLINTEND
320
321public:
322 // static variables
323 // NOLINTBEGIN
324 MCAPI static ::SemVersionConstant const& mDataDrivenEnderDragonSupportedVersion();
325
326 MCAPI static ::SemVersionConstant const& mDataDrivenRenderingSupportedVersion();
327
328 MCAPI static ::SemVersionConstant const& mDrownedParentFieldSupportedVersion();
329
330 MCAPI static ::SemVersionConstant const& mParentFieldSupportedVersion();
331 // NOLINTEND
332
333public:
334 // constructor thunks
335 // NOLINTBEGIN
336 MCAPI void* $ctor(
337 ::std::string const& serializableName,
338 ::std::string const& sourceFilePathWithExtension,
339 bool isFromBaseGamePack,
340 int texw,
341 int texh
342 );
343
344 MCAPI void* $ctor(
345 ::std::string const& serializableName,
346 ::std::string const& sourceFilePathWithExtension,
347 ::Geometry const& source,
348 bool isFromBaseGamePack,
349 int texw,
350 int texh
351 );
352 // NOLINTEND
353
354public:
355 // destructor thunk
356 // NOLINTBEGIN
357 MCAPI void $dtor();
358 // NOLINTEND
359};
Definition Geometry.h:5
Definition JsonValueHierarchy.h:13
Definition Value.h:16
Definition ModelPartLocator.h:11
Definition SemVersionConstant.h:8
Definition Geometry.h:20
Definition Geometry.h:18
Definition Geometry.h:24
Definition Geometry.h:26
Definition Geometry.h:22
Definition Geometry.h:28
Definition TextureUVCoordinateSet.h:5