LeviLamina
Loading...
Searching...
No Matches
ActorRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/BaseActorRenderer.h"
7#include "mc/deps/core/container/small_vector_base.h"
8#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
9#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
10#include "mc/world/phys/AABB.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class ActorRenderData;
17class Model;
18class RenderParams;
19class Tessellator;
20class Vec2;
21class Vec3;
22struct ActorTextureInfo;
23struct ActorUniqueID;
25struct RopePoints;
26namespace mce { class Color; }
27namespace mce { class Mesh; }
28namespace mce { class TextureGroup; }
29// clang-format on
30
31class ActorRenderer : public ::BaseActorRenderer, public ::std::enable_shared_from_this<::ActorRenderer> {
32public:
33 // ActorRenderer inner types declare
34 // clang-format off
35 struct LeashPins;
36 // clang-format on
37
38 // ActorRenderer inner types define
39 struct LeashPins {
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::UntypedStorage<4, 12> mUnkadd485;
44 ::ll::UntypedStorage<4, 12> mUnk9c3e04;
45 ::ll::UntypedStorage<4, 12> mUnk95cfb7;
46 ::ll::UntypedStorage<4, 12> mUnkc010bc;
47 ::ll::UntypedStorage<4, 12> mUnk8a6402;
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
52 LeashPins& operator=(LeashPins const&);
53 LeashPins(LeashPins const&);
54 LeashPins();
55 };
56
57public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<1, 1, bool> mRenderingInventory;
61 ::ll::TypedStorage<1, 1, bool const> mHasWaterHole;
62 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestMaterial;
63 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestGlintMaterial;
64 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mGlintTexture;
65 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mAtlasTexture;
66 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::TextureGroup>> mTextureGroup;
67 ::ll::TypedStorage<4, 24, ::AABB> mBaseRenderBounds;
68 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Model>> mModel;
69 // NOLINTEND
70
71public:
72 // prevent constructor by default
73 ActorRenderer();
74
75public:
76 // virtual functions
77 // NOLINTBEGIN
78 virtual ~ActorRenderer() /*override*/;
79
80 virtual void render(::BaseActorRenderContext&, ::ActorRenderData&) = 0;
81
82 virtual void renderDebug(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
83
84 virtual void renderEffects(::BaseActorRenderContext&, ::ActorRenderData&);
85
86 virtual void renderLeash(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
87
88 virtual void renderWaterHole(::BaseActorRenderContext&, ::ActorRenderData&);
89
90 virtual void addAdditionalRenderingIfNeeded(::std::shared_ptr<::mce::TextureGroup>);
91
92 virtual ::AABB getRenderBounds(::Actor const& entity) const;
93
94 virtual void getLeashOffsets(
95 ::Actor&,
96 float yRot,
97 float yRotPrev,
98 float a,
99 bool legacyOffset,
100 ::Bedrock::small_vector_base<::Vec3>& output
101 ) const;
102
103 virtual void setIsOnScreen(::Actor&, bool const, float) const;
104
105 virtual bool shouldUpdateBonesAndEffectsIfOffScreen(::RenderParams&) const;
106
107 virtual bool shouldUpdateEffectsIfOffScreen(::RenderParams&) const;
108 // NOLINTEND
109
110public:
111 // member functions
112 // NOLINTBEGIN
113 MCAPI ActorRenderer(
114 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
115 ::Vec2 const& renderDim,
116 ::Vec3 const& renderDimOffset,
117 bool hasWaterHole
118 );
119
120 MCAPI ActorRenderer(
121 ::std::shared_ptr<::Model> model,
122 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
123 ::Vec2 const& renderDim,
124 ::Vec3 const& renderDimOffset,
125 bool hasWaterHole
126 );
127
128 MCAPI ::std::vector<::NameTagRenderObject> extractText(
129 ::Tessellator& tessellator,
130 ::Actor const& entity,
131 ::std::string const& str,
132 ::std::vector<int> const& widths,
133 ::Vec3 camTargetPos,
134 float a,
135 ::mce::Color color
136 );
137
138 MCAPI ::mce::TexturePtr getAtlasTexture();
139
140 MCAPI void renderGui(::BaseActorRenderContext& renderContext, ::ActorRenderData& actorRenderData);
141
142 MCAPI void setBaseRenderBounds(::Vec2 const& dims, ::Vec3 const& offset);
143 // NOLINTEND
144
145public:
146 // static functions
147 // NOLINTBEGIN
148 MCAPI static void _addLeashPinToOutput(
149 ::Vec3 const& fromLeashes,
150 ::Vec3 const& toLeashes,
151 ::Actor const& actor,
152 ::Actor const* roper,
153 ::ActorUniqueID roperID,
154 uint64 ropeIndex,
155 float actorFrameAlpha,
156 ::Bedrock::small_vector_base<::ActorRenderer::LeashPins>& output
157 );
158
159 MCAPI static void _buildFlameMesh(::Tessellator& tessellator, ::std::shared_ptr<::mce::TextureGroup> textureGroup);
160
161 MCAPI static void _drawClassicLeash(
162 ::BaseActorRenderContext& renderContext,
163 ::Vec3 const& ropeStart,
164 ::Vec3 const& delta,
165 ::mce::TexturePtr& tex
166 );
167
168 MCAPI static void _drawRopeRange(
169 ::BaseActorRenderContext& renderContext,
170 int begin,
171 int end,
172 ::Vec3 const& basisX,
173 ::Vec3 const& basisY,
174 ::Vec3 const& deltaNorm,
175 ::RopePoints const& nodes,
176 ::mce::TexturePtr& tex,
177 float a,
178 ::Vec3* startPoint,
179 ::Vec3* endPoint
180 );
181
182 MCAPI static void _getLeashPins(
183 float actorFrameAlpha,
184 ::BaseActorRenderContext& renderContext,
185 ::Actor& actor,
186 ::Bedrock::small_vector_base<::ActorRenderer::LeashPins>& output,
187 ::Bedrock::small_vector_base<::Vec3>& leashFromOffsets
188 );
189
190 MCAPI static bool isDitheringEnabled(::BaseActorRenderContext const& renderContext, ::Actor const& actor);
191
192 MCAPI static void renderDebugAttachPos(int renderAttachPos, ::Actor const& mob);
193
194 MCAPI static void renderFlame(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
195
196 MCAPI static void renderLeash(
197 ::BaseActorRenderContext& renderContext,
198 ::ActorRenderData& entityRenderData,
199 ::Bedrock::small_vector_base<::ActorRenderer::LeashPins>& allLeashPins
200 );
201
202 MCAPI static void resetTextures();
203 // NOLINTEND
204
205public:
206 // static variables
207 // NOLINTBEGIN
208 MCAPI static ::Vec2 const& DEFAULT_RENDER_BOUNDS();
209
210 MCAPI static ::mce::MaterialPtr& mFlameMaterial();
211
212 MCAPI static ::mce::Mesh& mFlameMesh();
213
214 MCAPI static ::ActorTextureInfo& mFlameTexture();
215
216 MCAPI static ::mce::MaterialPtr& mLeashMat();
217
218 MCAPI static ::mce::TexturePtr& mLeashTexture();
219 // NOLINTEND
220
221public:
222 // constructor thunks
223 // NOLINTBEGIN
224 MCAPI void* $ctor(
225 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
226 ::Vec2 const& renderDim,
227 ::Vec3 const& renderDimOffset,
228 bool hasWaterHole
229 );
230
231 MCAPI void* $ctor(
232 ::std::shared_ptr<::Model> model,
233 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
234 ::Vec2 const& renderDim,
235 ::Vec3 const& renderDimOffset,
236 bool hasWaterHole
237 );
238 // NOLINTEND
239
240public:
241 // destructor thunk
242 // NOLINTBEGIN
243 MCAPI void $dtor();
244 // NOLINTEND
245
246public:
247 // virtual function thunks
248 // NOLINTBEGIN
249 MCAPI void $renderDebug(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
250
251 MCFOLD void $renderEffects(::BaseActorRenderContext&, ::ActorRenderData&);
252
253 MCAPI void $renderLeash(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
254
255 MCFOLD void $renderWaterHole(::BaseActorRenderContext&, ::ActorRenderData&);
256
257 MCFOLD void $addAdditionalRenderingIfNeeded(::std::shared_ptr<::mce::TextureGroup>);
258
259 MCAPI ::AABB $getRenderBounds(::Actor const& entity) const;
260
261 MCAPI void $getLeashOffsets(
262 ::Actor&,
263 float yRot,
264 float yRotPrev,
265 float a,
266 bool legacyOffset,
267 ::Bedrock::small_vector_base<::Vec3>& output
268 ) const;
269
270 MCFOLD void $setIsOnScreen(::Actor&, bool const, float) const;
271
272 MCFOLD bool $shouldUpdateBonesAndEffectsIfOffScreen(::RenderParams&) const;
273
274 MCFOLD bool $shouldUpdateEffectsIfOffScreen(::RenderParams&) const;
275 // NOLINTEND
276
277public:
278 // vftables
279 // NOLINTBEGIN
280 MCNAPI static void** $vftable();
281 // NOLINTEND
282};
Definition ActorRenderData.h:5
Definition ActorRenderer.h:5
static MCAPI void ** $vftable()
MCAPI void $dtor()
Definition Actor.h:105
Definition BaseActorRenderContext.h:34
Definition BaseActorRenderer.h:5
Definition Model.h:5
Definition RenderParams.h:30
Definition Tessellator.h:5
Definition Vec2.h:5
Definition Vec3.h:10
Definition Color.h:13
Definition Mesh.h:7
Definition TextureGroup.h:7
Definition ActorRenderer.h:13
Definition ActorTextureInfo.h:5
Definition ActorUniqueID.h:5
Definition NameTagRenderObject.h:5
Definition RopePoints.h:10