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 // member functions
56 // NOLINTBEGIN
57 MCAPI void _boxFaceUVToJson(
58 ::Json::Value& uvNode,
59 uchar facing,
60 ::std::string const& faceName,
61 ::std::vector<::std::string> const& materialInstanceList
62 ) const;
63 // NOLINTEND
64 };
65
66 struct NodeVertex {
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<4, 4, uint> mPositionIndex;
71 ::ll::TypedStorage<4, 4, uint> mNormalIndex;
72 ::ll::TypedStorage<4, 4, uint> mUVIndex;
73 // NOLINTEND
74
75 public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI void toJson(::Json::Value& root) const;
79 // NOLINTEND
80 };
81
82 struct NodePolyMesh {
83 public:
84 // member variables
85 // NOLINTBEGIN
86 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mPositions;
87 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mNormals;
88 ::ll::TypedStorage<8, 24, ::std::vector<::Vec2>> mUVs;
89 ::ll::TypedStorage<8, 24, ::std::vector<::std::array<::Geometry::NodeVertex, 3>>> mTris;
90 ::ll::TypedStorage<8, 24, ::std::vector<::std::array<::Geometry::NodeVertex, 4>>> mQuads;
91 ::ll::TypedStorage<1, 1, bool> mAreUVsNormalized;
92 // NOLINTEND
93
94 public:
95 // prevent constructor by default
96 NodePolyMesh();
97
98 public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI NodePolyMesh(::Geometry::NodePolyMesh const&);
102
103 MCAPI ::Geometry::NodePolyMesh& operator=(::Geometry::NodePolyMesh&&);
104
105 MCAPI ::Geometry::NodePolyMesh& operator=(::Geometry::NodePolyMesh const&);
106
107 MCAPI ~NodePolyMesh();
108 // NOLINTEND
109
110 public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(::Geometry::NodePolyMesh const&);
114 // NOLINTEND
115
116 public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCAPI void $dtor();
120 // NOLINTEND
121 };
122
123 struct NodeTextureMesh {
124 public:
125 // member variables
126 // NOLINTBEGIN
127 ::ll::TypedStorage<8, 32, ::std::string> mTextureName;
128 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
129 ::ll::TypedStorage<4, 12, ::Vec3> mLocalPivot;
130 ::ll::TypedStorage<4, 12, ::Vec3> mRotation;
131 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
132 ::ll::TypedStorage<1, 1, bool> mUsePixelDepth;
133 // NOLINTEND
134 };
135
136 struct Node {
137 public:
138 // member variables
139 // NOLINTBEGIN
140 ::ll::TypedStorage<8, 16, ::std::set<::std::string>> mMixedCaseNames;
141 ::ll::TypedStorage<1, 1, bool> mMirror;
142 ::ll::TypedStorage<1, 1, bool> mNeverRender;
143 ::ll::TypedStorage<4, 12, ::Vec3> mPivot;
144 ::ll::TypedStorage<4, 12, ::Vec3> mRot;
145 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
146 ::ll::TypedStorage<4, 12, ::Vec3> mBindPoseRotation;
147 ::ll::TypedStorage<4, 4, float> mInflate;
148 ::ll::TypedStorage<1, 1, bool> mPivotSubtractsParentPivot;
149 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::Box>> mBoxes;
150 ::ll::TypedStorage<8, 32, ::std::string> mParentName;
151 ::ll::TypedStorage<8, 32, ::std::string> mBoneBindingExpression;
152 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPartLocator>> mLocators;
153 ::ll::TypedStorage<8, 128, ::Geometry::NodePolyMesh> mMesh;
154 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::NodeTextureMesh>> mTextureMeshes;
155 ::ll::TypedStorage<1, 1, bool> mDebug;
156 ::ll::TypedStorage<4, 4, uint> mSkinnedMeshGroupIdentifier;
157 ::ll::TypedStorage<8, 24, ::SemVersion> mSourceFileVersion;
158 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mSourceMinEngineVersion;
159 // NOLINTEND
160
161 public:
162 // prevent constructor by default
163 Node& operator=(Node const&);
164 Node();
165
166 public:
167 // member functions
168 // NOLINTBEGIN
169 MCAPI Node(::Geometry::Node const&);
170
171 MCAPI void addLocator(
172 ::std::string const& name,
173 ::std::string const& boneName,
174 ::Vec3 const& localOffset,
175 bool ignoreInheritedScale,
176 bool errorIfIdenticalLocatorAlreadyExists
177 );
178
179 MCAPI ~Node();
180 // NOLINTEND
181
182 public:
183 // constructor thunks
184 // NOLINTBEGIN
185 MCAPI void* $ctor(::Geometry::Node const&);
186 // NOLINTEND
187
188 public:
189 // destructor thunk
190 // NOLINTBEGIN
191 MCAPI void $dtor();
192 // NOLINTEND
193 };
194
195public:
196 // member variables
197 // NOLINTBEGIN
198 ::ll::TypedStorage<4, 4, ::SkinAdjustments> mSkinAdjustments;
199 ::ll::TypedStorage<4, 8, ::Vec2> mRenderDim;
200 ::ll::TypedStorage<4, 12, ::Vec3> mRenderDimOffset;
201 ::ll::TypedStorage<4, 12, ::Vec3> mLeashOffset;
202 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
203 ::ll::TypedStorage<1, 1, bool> mUseModelData;
204 ::ll::TypedStorage<1, 1, bool> mModified;
205 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::ItemDisplayTransform>> mItemTransforms;
206 ::ll::TypedStorage<1, 1, ::FitToFrame> mFitGuiItemToFrame;
207 ::ll::TypedStorage<4, 8, ::Vec2> mTextureDimensions;
208 ::ll::TypedStorage<8, 32, ::std::string> mSourceFilePathWithExtension;
209 ::ll::TypedStorage<8, 32, ::std::string> mSerializableName;
210 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::Geometry::Node>> mNodes;
211 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mMinEngineVersion;
212 ::ll::TypedStorage<1, 1, bool> mIsFromBaseGamePack;
213 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMaterialInstanceList;
214 // NOLINTEND
215
216public:
217 // member functions
218 // NOLINTBEGIN
219 MCAPI void
220 _parseBones(::JsonValueHierarchy const& root, bool applyBindPoseRotation, ::TextureUVCoordinateSet const& uvOffset);
221
222 MCAPI void _parseBoxFaceUV(
223 ::Geometry::Box& box,
224 ::Json::Value const& uvNode,
225 uchar facing,
226 ::std::string const& faceName,
227 ::Vec2 const& defaultUVSize,
228 ::TextureUVCoordinateSet const& uvOffset
229 );
230
231 MCAPI ::Geometry::Node const* getNode(::std::string_view name) const;
232
233 MCAPI void toJson(::Json::Value& root) const;
234 // NOLINTEND
235
236public:
237 // static variables
238 // NOLINTBEGIN
239 MCAPI static ::SemVersionConstant const& mDataDrivenEnderDragonSupportedVersion();
240
241 MCAPI static ::SemVersionConstant const& mDataDrivenRenderingSupportedVersion();
242
243 MCAPI static ::SemVersionConstant const& mDrownedParentFieldSupportedVersion();
244
245 MCAPI static ::SemVersionConstant const& mParentFieldSupportedVersion();
246 // NOLINTEND
247};
Definition Geometry.h:5
Definition JsonValueHierarchy.h:5
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