LeviLamina
Loading...
Searching...
No Matches
Model.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/application/AppPlatformListener.h"
7#include "mc/deps/core/math/Vec3.h"
8#include "mc/deps/core/string/HashedString.h"
9#include "mc/deps/minecraft_renderer/renderer/MaterialVariants.h"
10#include "mc/world/phys/AABB.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
18class ExpressionNode;
19class Mob;
20class ModelPart;
23class RenderParams;
24class ScreenContext;
25struct ActorTextureInfo;
26struct MERSUniformData;
27namespace dragon { struct RenderMetadata; }
28namespace mce { struct ClientTexture; }
29// clang-format on
30
31class Model : public ::AppPlatformListener {
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<4, 12, ::Vec3> mLeashOffset;
36 ::ll::TypedStorage<4, 4, float> mAttackTime;
37 ::ll::TypedStorage<1, 1, bool> mYoung;
38 ::ll::TypedStorage<1, 1, bool> mRiding;
39 ::ll::TypedStorage<8, 24, ::std::vector<::ModelPart*>> mAllParts;
40 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::HashedString>> mParticleEffectsMap;
41 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ModelPartLocator>> mLocators;
42 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::std::shared_ptr<::RenderController>, ::ExpressionNode>>>
43 mRenderControllers;
44 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::DataDrivenGeometry>>> mGeometries;
45 ::ll::TypedStorage<8, 8, uint64> mQueryableGeometryIndex;
46 ::ll::TypedStorage<4, 24, ::AABB> mAABB;
47 ::ll::TypedStorage<8, 32, ::MaterialVariants> mMaterialVariants;
48 // NOLINTEND
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 virtual ~Model() /*override*/;
54
55 virtual void clear();
56
57 virtual void onAppSuspended() /*override*/;
58
59 virtual void preDraw(::ScreenContext&);
60
61 virtual void postDraw(::ScreenContext&);
62
63 virtual void render(::ScreenContext& screenContext);
64
65 virtual void render(
66 ::ScreenContext& screenContext,
67 ::Actor& entity,
68 float time,
69 float r,
70 float bob,
71 float yRot,
72 float xRot,
73 float scale
74 );
75
76 virtual void render(::BaseActorRenderContext&);
77
78 virtual void
79 render(::BaseActorRenderContext& baseActorRenderContext, ::Actor&, float, float, float, float, float, float);
80
81 virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale);
82
83 virtual void setupAnim();
84
85 virtual void prepareMobModel(::Mob&, float, float, float);
86
87 virtual float getHeightAdjustment() const;
88
89 virtual ::AABB buildAABB() const;
90 // NOLINTEND
91
92public:
93 // member functions
94 // NOLINTBEGIN
95 MCAPI Model();
96
97 MCAPI void assignPartToGroup(
98 ::ModelPart& part,
99 bool forceToUniqueGroup,
100 int skinnedMeshGroupIdentifier,
101 ::DataDrivenGeometry* owningGeometry
102 );
103
104 MCAPI void dataDrivenDraw(
105 ::RenderParams& renderParams,
106 ::dragon::RenderMetadata const& renderMetadata,
107 ::gsl::not_null<::RenderController const*> renderController,
108 ::DataDrivenGeometry& geo,
109 ::ClientPBRTextureData const& textureData,
110 ::std::optional<::MERSUniformData> const& mersUniforms
111 );
112
113 MCAPI void draw(
114 ::ScreenContext& screenContext,
115 ::dragon::RenderMetadata const& renderMetadata,
116 ::mce::ClientTexture const& texture
117 );
118
119 MCAPI void draw(
120 ::ScreenContext& screenContext,
121 ::dragon::RenderMetadata const& renderMetadata,
122 ::ActorTextureInfo const& textureInfo
123 );
124
125 MCAPI void draw(
126 ::ScreenContext& screenContext,
127 ::dragon::RenderMetadata const& renderMetadata,
128 ::ClientPBRTextureData const& textureData,
129 ::std::optional<::MERSUniformData> const& mersUniforms
130 );
131
132 MCAPI void draw(
133 ::ScreenContext& screenContext,
134 ::dragon::RenderMetadata const& renderMetadata,
135 ::ClientPBRTextureData const& textureData,
136 ::MaterialVariants const& useMaterialVariant,
137 ::std::optional<::MERSUniformData> const& mersUniforms
138 );
139
140 MCAPI ::AABB getAABB() const;
141
142 MCFOLD ::std::vector<::std::shared_ptr<::DataDrivenGeometry>> const& getGeometries() const;
143
144 MCFOLD ::Vec3 getLeashOffsetPosition() const;
145
146 MCFOLD ::std::vector<::std::pair<::std::shared_ptr<::RenderController>, ::ExpressionNode>>& getRenderControllers();
147
148 MCAPI bool hasBone(::HashedString const& boneName) const;
149
150 MCAPI void prepareSkinning();
151
152 MCAPI void registerParts(::ModelPart& part);
153 // NOLINTEND
154
155public:
156 // constructor thunks
157 // NOLINTBEGIN
158 MCAPI void* $ctor();
159 // NOLINTEND
160
161public:
162 // destructor thunk
163 // NOLINTBEGIN
164 MCAPI void $dtor();
165 // NOLINTEND
166
167public:
168 // virtual function thunks
169 // NOLINTBEGIN
170 MCAPI void $clear();
171
172 MCAPI void $onAppSuspended();
173
174 MCFOLD void $preDraw(::ScreenContext&);
175
176 MCFOLD void $postDraw(::ScreenContext&);
177
178 MCFOLD void $render(::ScreenContext& screenContext);
179
180 MCAPI void $render(
181 ::ScreenContext& screenContext,
182 ::Actor& entity,
183 float time,
184 float r,
185 float bob,
186 float yRot,
187 float xRot,
188 float scale
189 );
190
191 MCFOLD void $render(::BaseActorRenderContext&);
192
193 MCAPI void
194 $render(::BaseActorRenderContext& baseActorRenderContext, ::Actor&, float, float, float, float, float, float);
195
196 MCFOLD void $setupAnim(float time, float r, float bob, float yRot, float xRot, float scale);
197
198 MCFOLD void $setupAnim();
199
200 MCFOLD void $prepareMobModel(::Mob&, float, float, float);
201
202 MCAPI float $getHeightAdjustment() const;
203
204 MCAPI ::AABB $buildAABB() const;
205 // NOLINTEND
206
207public:
208 // vftables
209 // NOLINTBEGIN
210 MCNAPI static void** $vftable();
211 // NOLINTEND
212};
Definition Actor.h:125
Definition AppPlatformListener.h:15
Definition BaseActorRenderContext.h:5
Definition ClientPBRTextureData.h:5
Definition DataDrivenGeometry.h:5
Definition ExpressionNode.h:36
Definition Mob.h:57
Definition ModelPartLocator.h:11
Definition ModelPart.h:5
Definition Model.h:5
static MCAPI void ** $vftable()
Definition RenderController.h:5
Definition RenderParams.h:30
Definition ScreenContext.h:5
Definition ActorTextureInfo.h:5
Definition MERSUniformData.h:5
Definition RenderMetadata.h:7
Definition ClientTexture.h:7