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