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