LeviLamina
Loading...
Searching...
No Matches
StructureVolumeRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/renderers/MinecraftUICustomRenderer.h"
7#include "mc/client/renderer/chunks/RenderChunkSorter.h"
8#include "mc/deps/application/AppPlatformListener.h"
9#include "mc/deps/core/math/Vec2.h"
10#include "mc/deps/core/math/Vec3.h"
11#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
12#include "mc/world/level/BlockChangedEventTarget.h"
13#include "mc/world/level/BlockPos.h"
14#include "mc/world/level/BlockSourceListener.h"
15#include "mc/world/level/Tick.h"
16#include "mc/world/phys/AABB.h"
17
18// auto generated forward declare list
19// clang-format off
20class Actor;
22class Block;
23class BlockActor;
24class BlockSource;
25class IClientInstance;
31class ScreenContext;
32class Tessellator;
33class UIControl;
35class UIPropertyBag;
41namespace ClientBlockPipeline { class TessellatorContext; }
42namespace mce::StructureVolumeOffscreenUtils { struct StructureVolumeCaptureRequestInfo; }
43// clang-format on
44
48public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<1, 1, bool> mInitialize;
52 ::ll::TypedStorage<1, 1, bool> mListenerInitialized;
53 ::ll::TypedStorage<1, 1, bool> mRendered;
54 ::ll::TypedStorage<4, 8, ::Vec2> mRotation;
55 ::ll::TypedStorage<4, 24, ::AABB> mLastArea;
56 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IRenderChunkGarbage>> mGarbage;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RenderChunkBuilder>> mChunkBuilder;
58 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::unique_ptr<::RenderChunkInstanced>>>
59 mRenderChunkInstances;
60 ::ll::TypedStorage<8, 8, ::Tick> mRenderTick;
61 ::ll::TypedStorage<4, 8, ::Vec2> mLastSortRotation;
62 ::ll::TypedStorage<4, 12, ::Vec3> mSortingCameraPos;
63 ::ll::TypedStorage<1, 1, bool> mResort;
64 ::ll::TypedStorage<8, 8, ::BlockSource*> mUnsafeSourcePointer;
65 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkSorterSharedInfo>> mSharedSortInfo;
66 ::ll::TypedStorage<8, 448, ::RenderChunkSorter> mChunkSorter;
67 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mAxesMaterial;
68 // NOLINTEND
69
70public:
71 // virtual functions
72 // NOLINTBEGIN
73 virtual ~StructureVolumeRenderer() /*override*/;
74
75 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
76
77 virtual void render(
78 ::MinecraftUIRenderContext& renderContext,
79 ::IClientInstance& client,
80 ::UIControl& owner,
81 int pass
82 ) /*override*/;
83
84 virtual void onSourceDestroyed(::BlockSource& source) /*override*/;
85
86 virtual void onBlockChanged(
87 ::BlockSource& source,
88 ::BlockPos const& pos,
89 uint layer,
90 ::Block const& block,
91 ::Block const& oldBlock,
92 int updateFlags,
93 ::ActorBlockSyncMessage const* syncMsg,
94 ::BlockChangedEventTarget eventTarget,
95 ::Actor* blockChangeSource
96 ) /*override*/;
97
98 virtual void onAppResumed() /*override*/;
99
100 virtual void onAppSuspended() /*override*/;
101 // NOLINTEND
102
103public:
104 // member functions
105 // NOLINTBEGIN
106 MCAPI StructureVolumeRenderer();
107
108 MCAPI ::BlockPos _getBlockPosition(::UIPropertyBag const& bag) const;
109
110 MCAPI ::RenderChunkInstanced& _getRenderChunkInstanced(::BlockPos const& chunkPos);
111
112 MCAPI ::AABB _getStructureArea(::UIPropertyBag const& bag) const;
113
114 MCAPI void _initializeChunkBuilder(
115 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
116 ::BlockSource& region,
117 ::Tessellator& tessellator,
118 ::AABB const& area
119 );
120
121 MCAPI void _onAreaChanged(::AABB const& newArea);
122
123 MCAPI void _render(
124 ::MinecraftUIRenderContext& renderContext,
125 ::BlockSource& region,
126 ::IClientInstance& client,
127 ::UIControl& owner,
128 int,
129 ::std::variant<
130 ::std::monostate,
131 ::UIActorOffscreenCaptureDescription,
132 ::UIThumbnailMeshOffscreenCaptureDescription,
133 ::UIMeshOffscreenCaptureDescription,
134 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
135 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo> requestInfo
136 );
137
138 MCAPI void _renderAxisHelpers(::ScreenContext& screenContext, ::UIControl const& owner) const;
139
140 MCAPI bool _renderBlockEntities(
141 ::BaseActorRenderContext& renderContext,
142 ::BlockSource& region,
143 ::AABB const& area,
144 bool renderAlphaLayer
145 ) const;
146
147 MCAPI bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
148
149 MCAPI bool
150 _renderEntities(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
151
152 MCAPI bool _renderPlayers(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
153
154 MCAPI bool _renderStructureWireframes(
155 ::BaseActorRenderContext& renderContext,
156 ::IClientInstance const& clientInstance,
157 ::BlockPos const& blockPos
158 ) const;
159
160 MCAPI void _renderThumbnailOffscreen(
161 ::MinecraftUIRenderContext& renderContext,
162 ::BlockSource& region,
163 ::IClientInstance& client,
164 ::std::variant<
165 ::std::monostate,
166 ::UIActorOffscreenCaptureDescription,
167 ::UIThumbnailMeshOffscreenCaptureDescription,
168 ::UIMeshOffscreenCaptureDescription,
169 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
170 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
171 );
172
173 MCAPI void _updatePreviewRotation(::UIControl& owner, float dt);
174 // NOLINTEND
175
176public:
177 // static functions
178 // NOLINTBEGIN
179 MCFOLD static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
180
181 MCAPI static void _iterateOverBlockEntities(
182 ::BlockSource& region,
183 ::AABB const& area,
184 ::std::function<void(::BlockActor&)> const& processBlockActor
185 );
186 // NOLINTEND
187
188public:
189 // constructor thunks
190 // NOLINTBEGIN
191 MCAPI void* $ctor();
192 // NOLINTEND
193
194public:
195 // destructor thunk
196 // NOLINTBEGIN
197 MCAPI void $dtor();
198 // NOLINTEND
199
200public:
201 // virtual function thunks
202 // NOLINTBEGIN
203 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
204
205 MCAPI void
206 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int pass);
207
208 MCAPI void $onSourceDestroyed(::BlockSource& source);
209
210 MCAPI void $onBlockChanged(
211 ::BlockSource& source,
212 ::BlockPos const& pos,
213 uint layer,
214 ::Block const& block,
215 ::Block const& oldBlock,
216 int updateFlags,
217 ::ActorBlockSyncMessage const* syncMsg,
218 ::BlockChangedEventTarget eventTarget,
219 ::Actor* blockChangeSource
220 );
221
222 MCAPI void $onAppResumed();
223
224 MCAPI void $onAppSuspended();
225 // NOLINTEND
226
227public:
228 // vftables
229 // NOLINTBEGIN
230 MCNAPI static void** $vftableForBlockSourceListener();
231
233
234 MCNAPI static void** $vftableForAppPlatformListener();
235 // NOLINTEND
236};
Definition Actor.h:106
Definition AppPlatformListener.h:15
Definition BaseActorRenderContext.h:5
Definition BlockActor.h:30
Definition BlockSourceListener.h:18
Definition BlockSource.h:71
Definition Block.h:43
Definition TessellatorContext.h:7
Definition IClientInstance.h:5
Definition IRenderChunkGarbage.h:5
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkInstanced.h:5
Definition RenderChunkSorterSharedInfo.h:5
Definition ScreenContext.h:5
Definition StructureVolumeRenderer.h:5
static MCAPI void ** $vftableForAppPlatformListener()
static MCAPI void ** $vftableForMinecraftUICustomRenderer()
static MCAPI void ** $vftableForBlockSourceListener()
Definition Tessellator.h:5
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIPropertyBag.h:5
Definition ActorBlockSyncMessage.h:8
Definition UIActorOffscreenCaptureDescription.h:5
Definition UIMeshOffscreenCaptureDescription.h:5
Definition UIStructureVolumeOffscreenCaptureDescription.h:5
Definition UIThumbnailMeshOffscreenCaptureDescription.h:5
Definition StructureVolumeCaptureRequestInfo.h:7