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 BlockSource;
24class IClientInstance;
31class Tessellator;
32class UIControl;
34class UIPropertyBag;
37namespace ClientBlockPipeline { class TessellatorContext; }
38namespace mce::StructureVolumeOffscreenUtils { struct StructureVolumeCaptureRequestInfo; }
39// clang-format on
40
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<1, 1, bool> mInitialize;
48 ::ll::TypedStorage<1, 1, bool> mListenerInitialized;
49 ::ll::TypedStorage<1, 1, bool> mRendered;
50 ::ll::TypedStorage<4, 8, ::Vec2> mRotation;
51 ::ll::TypedStorage<4, 24, ::AABB> mLastArea;
52 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IRenderChunkGarbage>> mGarbage;
53 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RenderChunkBuilder>> mChunkBuilder;
54 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::unique_ptr<::RenderChunkInstanced>>>
55 mRenderChunkInstances;
56 ::ll::TypedStorage<8, 8, ::Tick> mRenderTick;
57 ::ll::TypedStorage<4, 8, ::Vec2> mLastSortRotation;
58 ::ll::TypedStorage<4, 12, ::Vec3> mSortingCameraPos;
59 ::ll::TypedStorage<1, 1, bool> mResort;
60 ::ll::TypedStorage<8, 8, ::BlockSource*> mUnsafeSourcePointer;
61 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RenderChunkSorterSharedInfo>> mSharedSortInfo;
62 ::ll::TypedStorage<8, 448, ::RenderChunkSorter> mChunkSorter;
63 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mAxesMaterial;
64 // NOLINTEND
65
66public:
67 // virtual functions
68 // NOLINTBEGIN
69 virtual ~StructureVolumeRenderer() /*override*/ = default;
70
71 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
72
73 virtual void render(
74 ::MinecraftUIRenderContext& renderContext,
75 ::IClientInstance& client,
76 ::UIControl& owner,
77 int pass
78 ) /*override*/;
79
80 virtual void onSourceDestroyed(::BlockSource& source) /*override*/;
81
82 virtual void onBlockChanged(
83 ::BlockSource& source,
84 ::BlockPos const& pos,
85 uint layer,
86 ::Block const& block,
87 ::Block const& oldBlock,
88 int updateFlags,
89 ::ActorBlockSyncMessage const* syncMsg,
90 ::BlockChangedEventTarget eventTarget,
91 ::Actor* blockChangeSource
92 ) /*override*/;
93
94 virtual void onAppResumed() /*override*/;
95
96 virtual void onAppSuspended() /*override*/;
97 // NOLINTEND
98
99public:
100 // member functions
101 // NOLINTBEGIN
102 MCAPI StructureVolumeRenderer();
103
104 MCAPI void _initializeChunkBuilder(
105 ::ClientBlockPipeline::TessellatorContext& pipelineContext,
106 ::BlockSource& region,
107 ::Tessellator& tessellator,
108 ::AABB const& area
109 );
110
111 MCAPI void _onAreaChanged(::AABB const& newArea);
112
113 MCAPI void _render(
114 ::MinecraftUIRenderContext& renderContext,
115 ::BlockSource& region,
116 ::IClientInstance& client,
117 ::UIControl& owner,
118 int,
119 ::OffscreenCaptureDescription const& captureDescription,
120 ::std::optional<::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo> requestInfo
121 );
122
123 MCAPI bool _renderBlocks(::BaseActorRenderContext& renderContext, ::BlockSource& region, ::AABB const& area);
124
125 MCAPI void _renderThumbnailOffscreen(
126 ::MinecraftUIRenderContext& renderContext,
127 ::BlockSource& region,
128 ::IClientInstance& client,
129 ::OffscreenCaptureDescription const& captureDescription,
130 ::mce::StructureVolumeOffscreenUtils::StructureVolumeCaptureRequestInfo const& requestInfo
131 );
132 // NOLINTEND
133
134public:
135 // static functions
136 // NOLINTBEGIN
137 MCAPI static ::std::vector<::BlockPos> _generateChunkStartPositions(::AABB const& area);
138
139 MCAPI static float _getAndResetFloatValue(::UIPropertyBag& bag, ::std::string const& key);
140
141 MCAPI static void _iterateOverBlockEntities(
142 ::BlockSource& region,
143 ::AABB const& area,
144 ::std::function<void(::IVanillaRenderBlockActorComponent&)> const& processBlockActor
145 );
146 // NOLINTEND
147
148public:
149 // constructor thunks
150 // NOLINTBEGIN
151 MCAPI void* $ctor();
152 // NOLINTEND
153
154public:
155 // virtual function thunks
156 // NOLINTBEGIN
157 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
158
159 MCAPI void
160 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int pass);
161
162 MCAPI void $onSourceDestroyed(::BlockSource& source);
163
164 MCAPI void $onBlockChanged(
165 ::BlockSource& source,
166 ::BlockPos const& pos,
167 uint layer,
168 ::Block const& block,
169 ::Block const& oldBlock,
170 int updateFlags,
171 ::ActorBlockSyncMessage const* syncMsg,
172 ::BlockChangedEventTarget eventTarget,
173 ::Actor* blockChangeSource
174 );
175
176 MCAPI void $onAppResumed();
177
178 MCAPI void $onAppSuspended();
179 // NOLINTEND
180};
Definition Actor.h:113
Definition AppPlatformListener.h:16
Definition BaseActorRenderContext.h:5
Definition BlockSourceListener.h:18
Definition BlockSource.h:71
Definition Block.h:41
Definition TessellatorContext.h:7
Definition IClientInstance.h:5
Definition IRenderChunkGarbage.h:5
Definition IVanillaRenderBlockActorComponent.h:19
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkInstanced.h:5
Definition RenderChunkSorterSharedInfo.h:5
Definition StructureVolumeRenderer.h:5
Definition Tessellator.h:5
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIPropertyBag.h:5
Definition ActorBlockSyncMessage.h:8
Definition OffscreenCaptureDescription.h:5
Definition StructureVolumeCaptureRequestInfo.h:7