Skip to content
LeviMC
English
AutoLightDark
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
113 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
114 ::Vec2 const& renderDim,
115 ::Vec3 const& renderDimOffset,
116 bool hasWaterHole
117 );
118
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 MCNAPI 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,
142 );
143
144 MCNAPI 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,
153 float a,
154 ::Vec3* startPoint,
155 ::Vec3* endPoint
156 );
157
158 MCNAPI static void _getLeashPins(
159 float actorFrameAlpha,
160 ::BaseActorRenderContext& renderContext,
161 ::Actor& actor,
164 );
165
166 MCNAPI static bool isDitheringEnabled(::BaseActorRenderContext const& renderContext, ::Actor const& actor);
167
168 MCNAPI static void renderDebugAttachPos(int renderAttachPos, ::Actor const& mob);
169
170 MCNAPI static void renderFlame(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
171
172 MCNAPI static void renderLeash(
173 ::BaseActorRenderContext& renderContext,
174 ::ActorRenderData& entityRenderData,
176 );
177
178 MCNAPI static void resetTextures();
179 // NOLINTEND
180
181public:
182 // static variables
183 // NOLINTBEGIN
184 MCNAPI static ::Vec2 const& DEFAULT_RENDER_BOUNDS();
185
186 MCNAPI static ::mce::MaterialPtr& mFlameMaterial();
187
188 MCNAPI static ::mce::Mesh& mFlameMesh();
189
190 MCNAPI static ::ActorTextureInfo& mFlameTexture();
191
192 MCNAPI static ::mce::MaterialPtr& mLeashMat();
193
194 MCNAPI static ::mce::TexturePtr& mLeashTexture();
195 // NOLINTEND
196
197public:
198 // constructor thunks
199 // NOLINTBEGIN
200 MCNAPI void* $ctor(
201 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
202 ::Vec2 const& renderDim,
203 ::Vec3 const& renderDimOffset,
204 bool hasWaterHole
205 );
206
207 MCNAPI 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 MCNAPI void $dtor();
220 // NOLINTEND
221
222public:
223 // virtual function thunks
224 // NOLINTBEGIN
225 MCNAPI void $renderDebug(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
226
227 MCFOLD void $renderEffects(::BaseActorRenderContext& renderContext, ::ActorRenderData& actorRenderData);
228
229 MCNAPI void $renderLeash(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
230
231 MCNAPI void $renderWaterHole(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
232
233 MCNAPI void $addAdditionalRenderingIfNeeded(::std::shared_ptr<::mce::TextureGroup> textureGroup);
234
235 MCNAPI ::AABB $getRenderBounds(::Actor const& entity) const;
236
237 MCNAPI void $getLeashOffsets(
238 ::Actor&,
239 float yRot,
240 float yRotPrev,
241 float a,
242 bool legacyOffset,
244 ) const;
245
246 MCNAPI void $setIsOnScreen(::Actor&, bool, float) const;
247
249
250 MCNAPI bool $shouldUpdateEffectsIfOffScreen(::RenderParams& renderParams) const;
251
252 MCNAPI 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
MCAPI ActorRenderer(::std::shared_ptr<::mce::TextureGroup > textureGroup, ::Vec2 const &renderDim, ::Vec3 const &renderDimOffset, bool hasWaterHole)
MCAPI ActorRenderer(::std::shared_ptr<::Model > model, ::std::shared_ptr<::mce::TextureGroup > textureGroup, ::Vec2 const &renderDim, ::Vec3 const &renderDimOffset, bool hasWaterHole)
MCAPI void $addAdditionalRenderingIfNeeded(::std::shared_ptr<::mce::TextureGroup > textureGroup)
static MCAPI void renderFlame(::BaseActorRenderContext &renderContext, ::ActorRenderData &entityRenderData)
static MCAPI void _getLeashPins(float actorFrameAlpha, ::BaseActorRenderContext &renderContext, ::Actor &actor, ::Bedrock::small_vector_base<::ActorRenderer::LeashPins > &output, ::Bedrock::small_vector_base<::Vec3 > &leashFromOffsets)
MCAPI::AABB $getRenderBounds(::Actor const &entity) const
MCAPI void $renderDebug(::BaseActorRenderContext &renderContext, ::ActorRenderData &entityRenderData)
static MCAPI void _drawRopeRange(::BaseActorRenderContext &renderContext, int begin, int end, ::Vec3 const &basisX, ::Vec3 const &basisY, ::Vec3 const &deltaNorm, ::RopePoints const &nodes, ::mce::TexturePtr &tex, float a, ::Vec3 *startPoint, ::Vec3 *endPoint)
MCAPI bool $shouldUpdateBonesAndEffectsIfOffScreen(::RenderParams &renderParams) const
static MCAPI ::ActorTextureInfo & mFlameTexture()
static MCAPI ::mce::Mesh & mFlameMesh()
MCAPI void $setIsOnScreen(::Actor &, bool, float) const
MCAPI bool $shouldUpdateEffectsIfOffScreen(::RenderParams &renderParams) const
static MCAPI void resetTextures()
MCAPI void $dtor()
MCAPI void * $ctor(::std::shared_ptr<::mce::TextureGroup > textureGroup, ::Vec2 const &renderDim, ::Vec3 const &renderDimOffset, bool hasWaterHole)
static MCAPI void renderDebugAttachPos(int renderAttachPos, ::Actor const &mob)
static MCAPI void renderLeash(::BaseActorRenderContext &renderContext, ::ActorRenderData &entityRenderData, ::Bedrock::small_vector_base<::ActorRenderer::LeashPins > &allLeashPins)
MCAPI void $renderWaterHole(::BaseActorRenderContext &renderContext, ::ActorRenderData &entityRenderData)
static MCAPI ::Vec2 const & DEFAULT_RENDER_BOUNDS()
static MCAPI void _addLeashPinToOutput(::Vec3 const &fromLeashes, ::Vec3 const &toLeashes, ::Actor const &actor, ::Actor const *roper, ::ActorUniqueID const roperID, uint64 const ropeIndex, float const actorFrameAlpha, ::Bedrock::small_vector_base<::ActorRenderer::LeashPins > &output)
static MCAPI bool isDitheringEnabled(::BaseActorRenderContext const &renderContext, ::Actor const &actor)
MCAPI void $getLeashOffsets(::Actor &, float yRot, float yRotPrev, float a, bool legacyOffset, ::Bedrock::small_vector_base<::Vec3 > &output) const
MCAPI void * $ctor(::std::shared_ptr<::Model > model, ::std::shared_ptr<::mce::TextureGroup > textureGroup, ::Vec2 const &renderDim, ::Vec3 const &renderDimOffset, bool hasWaterHole)
static MCAPI ::mce::MaterialPtr & mFlameMaterial()
static MCAPI void ** $vftable()
MCAPI bool $shouldHideHeldItems(::RenderParams &renderParams) const
MCAPI void $renderLeash(::BaseActorRenderContext &renderContext, ::ActorRenderData &entityRenderData)
static MCAPI ::mce::MaterialPtr & mLeashMat()
static MCAPI ::mce::TexturePtr & mLeashTexture()
Definition Actor.h:116
Definition BaseActorRenderContext.h:5
Definition BaseActorRenderer.h:5
Definition small_vector_base.h:10
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 TexturePtr.h:7
Definition ActorRenderer.h:13
Definition ActorTextureInfo.h:5
Definition ActorUniqueID.h:5
Definition RopePoints.h:10