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 float _getAndResetFloatValue(::UIPropertyBag& bag, ::std::string const& key) const;
109
110 MCAPI ::BlockPos _getBlockPosition(::UIPropertyBag const& bag) const;
111
112 MCAPI ::RenderChunkInstanced& _getRenderChunkInstanced(::BlockPos const& chunkPos);
113
114 MCAPI ::AABB _getStructureArea(::UIPropertyBag const& bag) const;
115
116 MCAPI void _initializeChunkBuilder(
117 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
118 ::BlockSource& region,
119 ::Tessellator& tessellator,
120 ::AABB const& area
121 );
122
123 MCAPI void _onAreaChanged(::AABB const& newArea);
124
125 MCAPI void _render(
126 ::MinecraftUIRenderContext& renderContext,
127 ::BlockSource& region,
128 ::IClientInstance& client,
129 ::UIControl& owner,
130 int captureDescription,
131 ::std::variant<
132 ::std::monostate,
133 ::UIActorOffscreenCaptureDescription,
134 ::UIThumbnailMeshOffscreenCaptureDescription,
135 ::UIMeshOffscreenCaptureDescription,
136 ::UIStructureVolumeOffscreenCaptureDescription> const& requestInfo,
137 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo>
138 );
139
140 MCAPI void _renderAxisHelpers(::ScreenContext& screenContext, ::UIControl const& owner) const;
141
142 MCAPI bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
143
144 MCAPI bool
145 _renderEntities(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
146
147 MCAPI bool _renderPlayers(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area) const;
148
149 MCAPI bool _renderStructureWireframes(
150 ::BaseActorRenderContext& renderContext,
151 ::IClientInstance const& clientInstance,
152 ::BlockPos const& blockPos
153 ) const;
154
155 MCAPI void _renderThumbnailOffscreen(
156 ::MinecraftUIRenderContext& renderContext,
157 ::BlockSource& region,
158 ::IClientInstance& client,
159 ::std::variant<
160 ::std::monostate,
161 ::UIActorOffscreenCaptureDescription,
162 ::UIThumbnailMeshOffscreenCaptureDescription,
163 ::UIMeshOffscreenCaptureDescription,
164 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
165 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
166 );
167
168 MCAPI void _updatePreviewRotation(::UIControl& owner, float dt);
169
170 MCAPI void offscreenThumbnailCapture(
171 ::MinecraftUIRenderContext& renderContext,
172 ::BlockSource& region,
173 ::IClientInstance& client,
174 ::std::variant<
175 ::std::monostate,
176 ::UIActorOffscreenCaptureDescription,
177 ::UIThumbnailMeshOffscreenCaptureDescription,
178 ::UIMeshOffscreenCaptureDescription,
179 ::UIStructureVolumeOffscreenCaptureDescription> const& captureDescription,
180 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo requestInfo
181 );
182 // NOLINTEND
183
184public:
185 // static functions
186 // NOLINTBEGIN
187 MCFOLD static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
188
189 MCAPI static void _iterateOverBlockEntities(
190 ::BlockSource& region,
191 ::AABB const& area,
192 ::std::function<void(::BlockActor&)> const& processBlockActor
193 );
194 // NOLINTEND
195
196public:
197 // constructor thunks
198 // NOLINTBEGIN
199 MCAPI void* $ctor();
200 // NOLINTEND
201
202public:
203 // destructor thunk
204 // NOLINTBEGIN
205 MCAPI void $dtor();
206 // NOLINTEND
207
208public:
209 // virtual function thunks
210 // NOLINTBEGIN
211 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
212
213 MCAPI void
214 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int pass);
215
216 MCAPI void $onSourceDestroyed(::BlockSource& source);
217
218 MCAPI void $onBlockChanged(
219 ::BlockSource& source,
220 ::BlockPos const& pos,
221 uint layer,
222 ::Block const& block,
223 ::Block const& oldBlock,
224 int updateFlags,
225 ::ActorBlockSyncMessage const* syncMsg,
226 ::BlockChangedEventTarget eventTarget,
227 ::Actor* blockChangeSource
228 );
229
230 MCFOLD void $onAppResumed();
231
232 MCAPI void $onAppSuspended();
233 // NOLINTEND
234
235public:
236 // vftables
237 // NOLINTBEGIN
238 MCNAPI static void** $vftableForBlockSourceListener();
239
241
242 MCNAPI static void** $vftableForAppPlatformListener();
243 // NOLINTEND
244};
Definition Actor.h:125
Definition AppPlatformListener.h:15
Definition BaseActorRenderContext.h:5
Definition BlockActor.h:30
Definition BlockSourceListener.h:18
Definition BlockSource.h:73
Definition Block.h:69
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