Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI 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 MCNAPI 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& operator=(NodePolyMesh const&);
98
99 public:
100 // member functions
101 // NOLINTBEGIN
103
105 // NOLINTEND
106
107 public:
108 // constructor thunks
109 // NOLINTBEGIN
110 MCNAPI void* $ctor(::Geometry::NodePolyMesh const&);
111 // NOLINTEND
112
113 public:
114 // destructor thunk
115 // NOLINTBEGIN
116 MCNAPI void $dtor();
117 // NOLINTEND
118 };
119
120 struct NodeTextureMesh {
121 public:
122 // member variables
123 // NOLINTBEGIN
124 ::ll::TypedStorage<8, 32, ::std::string> mTextureName;
125 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
126 ::ll::TypedStorage<4, 12, ::Vec3> mLocalPivot;
127 ::ll::TypedStorage<4, 12, ::Vec3> mRotation;
128 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
129 ::ll::TypedStorage<1, 1, bool> mUsePixelDepth;
130 // NOLINTEND
131 };
132
133 struct Node {
134 public:
135 // member variables
136 // NOLINTBEGIN
137 ::ll::TypedStorage<8, 16, ::std::set<::std::string>> mMixedCaseNames;
138 ::ll::TypedStorage<1, 1, bool> mMirror;
139 ::ll::TypedStorage<1, 1, bool> mNeverRender;
140 ::ll::TypedStorage<4, 12, ::Vec3> mPivot;
141 ::ll::TypedStorage<4, 12, ::Vec3> mRot;
142 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
143 ::ll::TypedStorage<4, 12, ::Vec3> mBindPoseRotation;
144 ::ll::TypedStorage<4, 4, float> mInflate;
145 ::ll::TypedStorage<1, 1, bool> mPivotSubtractsParentPivot;
146 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::Box>> mBoxes;
147 ::ll::TypedStorage<8, 32, ::std::string> mParentName;
148 ::ll::TypedStorage<8, 32, ::std::string> mBoneBindingExpression;
149 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPartLocator>> mLocators;
150 ::ll::TypedStorage<8, 128, ::Geometry::NodePolyMesh> mMesh;
151 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::NodeTextureMesh>> mTextureMeshes;
152 ::ll::TypedStorage<1, 1, bool> mDebug;
153 ::ll::TypedStorage<4, 4, uint> mSkinnedMeshGroupIdentifier;
154 ::ll::TypedStorage<8, 24, ::SemVersion> mSourceFileVersion;
155 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mSourceMinEngineVersion;
156 // NOLINTEND
157
158 public:
159 // prevent constructor by default
160 Node& operator=(Node const&);
161 Node();
162
163 public:
164 // member functions
165 // NOLINTBEGIN
166 MCNAPI Node(::Geometry::Node const&);
167
168 MCNAPI void addLocator(
169 ::std::string const& name,
170 ::std::string const& boneName,
171 ::Vec3 const& localOffset,
172 bool ignoreInheritedScale,
173 bool errorIfIdenticalLocatorAlreadyExists
174 );
175
176 MCNAPI ~Node();
177 // NOLINTEND
178
179 public:
180 // constructor thunks
181 // NOLINTBEGIN
182 MCNAPI void* $ctor(::Geometry::Node const&);
183 // NOLINTEND
184
185 public:
186 // destructor thunk
187 // NOLINTBEGIN
188 MCNAPI void $dtor();
189 // NOLINTEND
190 };
191
192public:
193 // member variables
194 // NOLINTBEGIN
195 ::ll::TypedStorage<4, 4, ::SkinAdjustments> mSkinAdjustments;
196 ::ll::TypedStorage<4, 8, ::Vec2> mRenderDim;
197 ::ll::TypedStorage<4, 12, ::Vec3> mRenderDimOffset;
198 ::ll::TypedStorage<4, 12, ::Vec3> mLeashOffset;
199 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
200 ::ll::TypedStorage<1, 1, bool> mUseModelData;
201 ::ll::TypedStorage<1, 1, bool> mModified;
202 ::ll::TypedStorage<8, 24, ::std::vector<::Geometry::ItemDisplayTransform>> mItemTransforms;
203 ::ll::TypedStorage<1, 1, ::FitToFrame> mFitGuiItemToFrame;
204 ::ll::TypedStorage<4, 8, ::Vec2> mTextureDimensions;
205 ::ll::TypedStorage<8, 32, ::std::string> mSourceFilePathWithExtension;
206 ::ll::TypedStorage<8, 32, ::std::string> mSerializableName;
207 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::Geometry::Node>> mNodes;
208 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mMinEngineVersion;
209 ::ll::TypedStorage<1, 1, bool> mIsFromBaseGamePack;
210 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMaterialInstanceList;
211 // NOLINTEND
212
213public:
214 // member functions
215 // NOLINTBEGIN
216 MCNAPI void
217 _parseBones(::JsonValueHierarchy const& root, bool applyBindPoseRotation, ::TextureUVCoordinateSet const& uvOffset);
218
219 MCNAPI void _parseBoxFaceUV(
220 ::Geometry::Box& box,
221 ::Json::Value const& uvNode,
222 uchar facing,
223 ::std::string const& faceName,
224 ::Vec2 const& defaultUVSize,
225 ::TextureUVCoordinateSet const& uvOffset
226 );
227
228 MCNAPI ::Geometry::Node const* getNode(::std::string_view name) const;
229
230 MCNAPI void toJson(::Json::Value& root) const;
231 // NOLINTEND
232
233public:
234 // static variables
235 // NOLINTBEGIN
236 MCNAPI static ::SemVersionConstant const& mDataDrivenEnderDragonSupportedVersion();
237
238 MCNAPI static ::SemVersionConstant const& mDataDrivenRenderingSupportedVersion();
239
240 MCNAPI static ::SemVersionConstant const& mDrownedParentFieldSupportedVersion();
241
242 MCNAPI static ::SemVersionConstant const& mParentFieldSupportedVersion();
243 // NOLINTEND
244};
Definition Geometry.h:5
static MCAPI ::SemVersionConstant const & mDataDrivenRenderingSupportedVersion()
static MCAPI ::SemVersionConstant const & mDrownedParentFieldSupportedVersion()
MCAPI::Geometry::Node const * getNode(::std::string_view name) const
MCAPI void _parseBoxFaceUV(::Geometry::Box &box, ::Json::Value const &uvNode, uchar facing, ::std::string const &faceName, ::Vec2 const &defaultUVSize, ::TextureUVCoordinateSet const &uvOffset)
static MCAPI ::SemVersionConstant const & mDataDrivenEnderDragonSupportedVersion()
static MCAPI ::SemVersionConstant const & mParentFieldSupportedVersion()
MCAPI void toJson(::Json::Value &root) const
MCAPI void _parseBones(::JsonValueHierarchy const &root, bool applyBindPoseRotation, ::TextureUVCoordinateSet const &uvOffset)
Definition JsonValueHierarchy.h:5
Definition Value.h:16
Definition ModelPartLocator.h:11
Definition SemVersionConstant.h:8
Definition Vec2.h:5
Definition Vec3.h:10
Definition Geometry.h:20
MCAPI void _boxFaceUVToJson(::Json::Value &uvNode, uchar facing, ::std::string const &faceName, ::std::vector<::std::string > const &materialInstanceList) const
Definition Geometry.h:18
Definition Geometry.h:24
MCAPI NodePolyMesh(::Geometry::NodePolyMesh const &)
MCAPI void * $ctor(::Geometry::NodePolyMesh const &)
Definition Geometry.h:26
Definition Geometry.h:22
MCAPI void toJson(::Json::Value &root) const
Definition Geometry.h:28
MCAPI Node(::Geometry::Node const &)
MCAPI void * $ctor(::Geometry::Node const &)
MCAPI void $dtor()
MCAPI void addLocator(::std::string const &name, ::std::string const &boneName, ::Vec3 const &localOffset, bool ignoreInheritedScale, bool errorIfIdenticalLocatorAlreadyExists)
Definition Node.h:5
Definition TextureUVCoordinateSet.h:5