3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/model/Geometry.h"
7#include "mc/client/model/geom/TextureOffset.h"
8#include "mc/client/renderer/controller/RenderController.h"
9#include "mc/deps/core/math/Vec2.h"
10#include "mc/deps/core/math/Vec3.h"
11#include "mc/deps/core/string/HashedString.h"
12#include "mc/platform/brstd/flat_map.h"
13#include "mc/util/molang/ExpressionNode.h"
14#include "mc/world/actor/animation/BoneAnimationRelativeMode.h"
15#include "mc/world/phys/AABB.h"
31namespace mce {
class Color; }
47 ::ll::UntypedStorage<8, 32> mUnk6a7c78;
48 ::ll::UntypedStorage<8, 56> mUnkddeb87;
49 ::ll::UntypedStorage<4, 12> mUnk202e6d;
50 ::ll::UntypedStorage<4, 12> mUnkb2c2b2;
51 ::ll::UntypedStorage<4, 12> mUnka0bfb0;
52 ::ll::UntypedStorage<4, 12> mUnkc2fbc4;
53 ::ll::UntypedStorage<1, 1> mUnka93767;
58 TextureMesh& operator=(TextureMesh
const&);
59 TextureMesh(TextureMesh
const&);
66 ::ll::TypedStorage<8, 48, ::HashedString> mName;
67 ::ll::TypedStorage<4, 12, ::Vec3> mPos;
68 ::ll::TypedStorage<4, 12, ::Vec3> mOffset;
69 ::ll::TypedStorage<4, 12, ::Vec3> mRot;
70 ::ll::TypedStorage<4, 12, ::Vec3> mScale;
71 ::ll::TypedStorage<4, 12, ::Vec3> mWorldPos;
72 ::ll::TypedStorage<4, 24, ::AABB> mAABB;
73 ::ll::TypedStorage<4, 4, int> mGroupIndex;
74 ::ll::TypedStorage<4, 4, int> mPartIndex;
75 ::ll::TypedStorage<4, 4, int> mMeshIndex;
76 ::ll::TypedStorage<4, 4, int> mBoneOrientationIndex;
77 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPartLocator>> mLocators;
78 ::ll::TypedStorage<8, 16, ::ExpressionNode> mBinding;
79 ::ll::TypedStorage<1, 1, ::BoneAnimationRelativeMode> mRotationRelativeMode;
80 ::ll::TypedStorage<1, 1, bool> mDebug;
81 ::ll::TypedStorage<4, 4, int const> IndexNotSet;
82 ::ll::TypedStorage<1, 1, bool> mMirror;
83 ::ll::TypedStorage<1, 1, bool> mVisible;
84 ::ll::TypedStorage<4, 4, int> mSkinnedMeshGroupIdentifier;
85 ::ll::TypedStorage<8, 24, ::std::vector<::Cube>> mCubes;
86 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPart::TextureMesh>> mTextureMeshes;
87 ::ll::TypedStorage<8, 128, ::Geometry::NodePolyMesh> mPolyMesh;
88 ::ll::TypedStorage<8, 8, ::ModelPart*> mParent;
89 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPart*>> mChildren;
90 ::ll::TypedStorage<4, 8, ::Vec2> mTexSize;
91 ::ll::TypedStorage<8, 16, ::TextureOffset> mTexOffs;
92 ::ll::TypedStorage<1, 1, bool> mNeverRender;
93 ::ll::TypedStorage<4, 12, ::Vec3> mOriginPos;
94 ::ll::TypedStorage<1, 1, bool> mHasColor;
95 ::ll::TypedStorage<1, 1, bool> mMaterialExpressionsNeedColorVertexFormatField;
100 ::RenderController
const*,
102 ::std::less<::RenderController const*>,
103 ::std::vector<::RenderController const*>,
104 ::std::vector<::ExpressionNode>>>
106 ::ll::TypedStorage<8, 64, ::std::unordered_map<::RenderController const*, ::ExpressionNode>> mMaterialExpressionMap;
111 ModelPart& operator=(ModelPart
const&);
112 ModelPart(ModelPart
const&);
118 MCAPI ModelPart(::ModelPart&& rhs);
120 MCAPI ModelPart(
int xTexOffs,
int yTexOffs,
int texWidth,
int texHeight);
122 MCAPI
void _adjustUVsInward(
123 ::std::vector<::Vec2>& uvs,
124 ::std::vector<::std::array<::Geometry::NodeVertex, 3>>
const& tris,
125 ::std::vector<::std::array<::Geometry::NodeVertex, 4>>
const& quads,
126 ::Vec2
const& textureSize
129 MCAPI
void _copyBoneMatricesToSkinnedMeshes(
130 ::RenderParams& renderParams,
131 ::gsl::span<::BoneOrientation const> boneOrientations,
132 ::RenderController
const* renderControllerId,
133 ::DataDrivenGeometry& geo,
137 MCAPI
void addBox(::Vec3
const& point0, ::Vec3
const& extents,
bool mirror,
float g, ::mce::Color
const& color);
140 addBoxMapTex(::Vec3
const& point0, ::Vec3
const& extents, ::TextureOffset
const& inTexOffset,
bool mirror,
float g);
142 MCAPI
void assignPartToGroup(::Model& model,
bool forceToUniqueGroup);
144 MCAPI
void assignPartToGroup(::Model& model,
bool forceToUniqueGroup, ::DataDrivenGeometry* owningGeometry);
146 MCAPI
void compileCubes(::Tessellator& tessellator);
148 MCAPI
void compileQuads(::MinecraftGameplayGraphicsResources& gameplayResources, ::Tessellator& tessellator);
150 MCAPI
void compileTris(::Tessellator& tessellator);
152 MCAPI
void copyBoneMatricesToActor(
153 ::RenderParams& renderParams,
154 ::gsl::span<::BoneOrientation const> boneOrientations,
155 ::RenderController
const* renderControllerId,
156 ::DataDrivenGeometry& geo
159 MCAPI
void expandAABB(::AABB& bb)
const;
161 MCAPI
void generateBoneTransformMatrices(
162 ::RenderParams& renderParams,
163 ::gsl::span<::BoneOrientation> boneOrientations,
164 ::RenderController
const* renderControllerId,
165 ::Matrix boneToEntitySpaceMatrix
168 MCAPI
void getPolyCounts(
int& triVertexCount,
int& quadVertexCount);
170 MCAPI
bool isVisible(::RenderParams& renderParams, ::RenderController
const* renderControllerId)
const;
172 MCAPI
bool load(::GeometryPtr source, ::std::string_view nodeName, ::ModelPart* parentPart);
175 ::std::shared_ptr<::ActorResourceDefinition> resourceDefinition,
176 ::GeometryPtr source,
177 ::std::string_view nodeName,
178 ::ModelPart* parentPart
181 MCAPI
void loadBoxes(
182 ::Vec3
const& newPivot,
183 ::Vec3
const& offset,
184 ::std::vector<::Geometry::Box>
const& boxes,
185 ::Vec3
const& bindPoseRotation
189 loadPolyMesh(::Vec3
const& newPivot, ::Vec3
const& bindPoseRotation, ::Geometry::NodePolyMesh
const& sourceMesh);
191 MCAPI
void loadTextureMeshes(
192 ::std::shared_ptr<::ActorResourceDefinition> resourceDefinition,
193 ::Vec3
const& newPivot,
195 ::std::vector<::Geometry::NodeTextureMesh>
const& sourceTextureMeshes
198 MCAPI
bool loadWithOrientation(
199 ::std::shared_ptr<::ActorResourceDefinition> resourceDefinition,
200 ::GeometryPtr source,
201 ::std::string_view nodeName,
202 ::Vec3
const& basePos,
204 ::ModelPart* parentPart
207 MCAPI
bool loadWithOrientation_(
208 ::GeometryPtr source,
209 ::std::string_view nodeName,
210 ::Vec3
const& basePos,
212 ::ModelPart* parentPart
215 MCAPI uint64 numCubes()
const;
217 MCAPI ::ModelPart& operator=(::ModelPart&& rhs);
220 ::ScreenContext& screenContext,
223 bool hideParentBodyPart,
225 ::Matrix boneToEntitySpaceMatrix
228 MCAPI
void renderAtPosition(
229 ::ScreenContext& screenContext,
231 ::Vec3
const& position,
233 bool hideParentBodyPart,
235 ::Matrix boneToEntitySpaceMatrix
238 MCAPI
void setModelPartMaterial(::mce::MaterialPtr
const& mat, ::RenderController
const* renderControllerId);
240 MCAPI
void translateTo(::Matrix& mv,
float scale);
248 MCAPI
void* $ctor(::ModelPart&& rhs);
250 MCAPI
void* $ctor(
int xTexOffs,
int yTexOffs,
int texWidth,
int texHeight);
Definition ActorResourceDefinition.h:5
Definition BoneOrientation.h:19
Definition DataDrivenGeometry.h:5
Definition GeometryPtr.h:5
Definition MinecraftGameplayGraphicsResources.h:5
Definition ModelPartLocator.h:11
Definition RenderParams.h:30
Definition ScreenContext.h:5
Definition Tessellator.h:5
Definition MaterialPtr.h:15
Definition ModelPart.h:13