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