Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RenderChunkGeometry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/block/BakedBlockLightType.h"
7#include "mc/common/SubClientId.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/ecs/EntityId.h"
10#include "mc/deps/minecraft_renderer/game/RangeIndices.h"
11#include "mc/util/Bounds.h"
12#include "mc/world/level/BlockPos.h"
13#include "mc/world/level/Tick.h"
14
15// auto generated forward declare list
16// clang-format off
22class TerrainTextures;
23class TextureAtlas;
24class Vec3;
25struct BlockQueueEntry;
31namespace RenderChunkVertexStreaming { class RenderChunkVertexStreamPlanRegistry; }
32namespace dragon { struct RenderMetadata; }
33namespace mce { class Mesh; }
34namespace mce { class TextureGroup; }
35namespace mce { struct BufferResourceService; }
36namespace mce { struct ServerTexture; }
37namespace mce::framebuilder { struct FrameLightingModelCapabilities; }
38// clang-format on
39
41public:
42 // RenderChunkGeometry inner types define
43 enum class Bit : uchar {
44 CanRender = 0,
45 Built = 1,
46 RayTracingModeOnAtBuildStart = 2,
47 RayTracingModeOnAtBuildEnd = 3,
48 HasSortedLayers = 4,
49 ImmediateChange = 5,
50 BlendCanRenderAsOpaque = 6,
51 Count = 7,
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<8, 8, ::Tick> mLastChangeTick;
58 ::ll::TypedStorage<8, 8, ::Tick> mFirstChangeTick;
59 ::ll::TypedStorage<
60 8,
61 24,
62 ::std::variant<
63 ::std::monostate,
64 ::std::shared_ptr<::mce::Mesh>,
65 ::std::shared_ptr<::RenderChunkDirectVertexData>,
66 ::std::shared_ptr<::RenderChunkLayerGroupVertexData>>>
67 mMeshData;
68 ::ll::TypedStorage<4, 4, ::std::bitset<7>> mFlags;
69 ::ll::TypedStorage<4, 4, float> mReadyTime;
70 ::ll::TypedStorage<4, 4, int> mBuildIterationCount;
71 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
72 ::ll::TypedStorage<4, 12, ::BlockPos> mCenter;
73 ::ll::TypedStorage<4, 48, ::Bounds> mDataBounds;
74 ::ll::TypedStorage<4, 4, ::EntityId> mEntityId;
75 ::ll::TypedStorage<8, 112, ::std::array<::std::shared_ptr<::FaceSortingMetaDataBase>, 7>> mFaceSortingMetaData;
76 ::ll::TypedStorage<4, 176, ::std::array<::RangeIndices, 22>> mRenderLayerIndexRanges;
77 ::ll::TypedStorage<4, 176, ::std::array<::RangeIndices, 22>> mWholeChunkSortSourceIndexRanges;
78 ::ll::TypedStorage<4, 4, float> mAverageSkyLight;
79 ::ll::TypedStorage<4, 4, ::std::bitset<6>> mInterlockBitField;
80 ::ll::TypedStorage<1, 6, ::std::array<uchar, 6>> mInterlockNeighborVersionNumbers;
81 ::ll::TypedStorage<1, 1, uchar> mBuildVersionNumber;
82 ::ll::TypedStorage<8, 24, ::std::vector<::BlockQueueEntry>> mPointLightCandidates;
83 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::IRenderChunkGarbage>> mRenderChunkGarbage;
84 // NOLINTEND
85
86public:
87 // prevent constructor by default
88 RenderChunkGeometry();
89
90public:
91 // member functions
92 // NOLINTBEGIN
94 ::BlockPos p,
95 bool immediateChangeRequested,
96 int buildIterationCount,
97 double overrideReadyTime,
98 uchar versionNum,
99 ::std::weak_ptr<::IRenderChunkGarbage> garbage,
100 ::EntityId entityId
101 );
102
104 ::std::array<::std::vector<::RenderChunkQuadInfo>, 7> const& faceMetadata,
105 bool hasSortedLayers
106 );
107
108 MCNAPI void _resetFaceMetadata();
109
110 MCNAPI uint64 endFaceSortOnly(
111 ::mce::BufferResourceService& bufferResourceService,
112 ::RenderChunkSorter& sorter,
113 ::std::variant<
114 ::std::monostate,
115 ::std::shared_ptr<::RenderChunkDirectIndexData>,
116 ::std::shared_ptr<::RenderChunkLayerGroupIndexData>>& nextIndices,
117 ::std::array<::RangeIndices, 22>& sortedIndexRange,
118 ::dragon::RenderMetadata const& renderMetadata
119 );
120
121 MCAPI void endRebuild(
122 ::RenderChunkBuilder& builder,
123 ::mce::BufferResourceService& bufferResourceService,
124 ::RenderChunkVertexStreaming::RenderChunkVertexStreamPlanRegistry const& renderChunkVertexStreamPlanRegistry,
125 bool isBuilding,
126 bool alreadyHadGeometry,
127 ::dragon::RenderMetadata const& renderMetadata,
128 bool useSplitStream
129 );
130
131 MCAPI void rebuild(
132 ::RenderChunkBuilder& builder,
133 bool transparentLeaves,
134 ::BakedBlockLightType lightingType,
135 bool forExport,
136 ::mce::framebuilder::FrameLightingModelCapabilities const& lightingModelCapabilities
137 );
138
139 MCAPI void reset();
140
141 MCNAPI void startRebuild(::RenderChunkBuilder& builder, ::Vec3 const& currentCameraPosition);
142
144 // NOLINTEND
145
146public:
147 // static functions
148 // NOLINTBEGIN
149 MCAPI static ::std::vector<::mce::ServerTexture> createTerrainTextureList(::SubClientId player);
150
151 MCNAPI static void initTextures(
152 ::Bedrock::NotNullNonOwnerPtr<::MinecraftGraphics> const& minecraftGraphics,
153 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
154 ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const> const& atlas
155 );
156 // NOLINTEND
157
158public:
159 // static variables
160 // NOLINTBEGIN
161 MCNAPI static ::std::unique_ptr<::TerrainTextures>& mTerrainTextures();
162 // NOLINTEND
163
164public:
165 // constructor thunks
166 // NOLINTBEGIN
167 MCNAPI void* $ctor(
168 ::BlockPos p,
169 bool immediateChangeRequested,
170 int buildIterationCount,
171 double overrideReadyTime,
172 uchar versionNum,
173 ::std::weak_ptr<::IRenderChunkGarbage> garbage,
174 ::EntityId entityId
175 );
176 // NOLINTEND
177
178public:
179 // destructor thunk
180 // NOLINTBEGIN
181 MCNAPI void $dtor();
182 // NOLINTEND
183};
Definition BlockPos.h:14
Definition EntityId.h:27
Definition FaceSortingMetaDataBase.h:5
Definition IRenderChunkGarbage.h:5
Definition MinecraftGraphics.h:5
Definition RenderChunkBuilder.h:5
Definition RenderChunkGeometry.h:5
MCAPI void _resetFaceMetadata()
static MCAPI void initTextures(::Bedrock::NotNullNonOwnerPtr<::MinecraftGraphics > const &minecraftGraphics, ::std::shared_ptr<::mce::TextureGroup > textureGroup, ::Bedrock::NotNullNonOwnerPtr<::TextureAtlas const > const &atlas)
MCAPI void _convertFaceMetaDataToFaceSortingMetaData(::std::array<::std::vector<::RenderChunkQuadInfo >, 7 > const &faceMetadata, bool hasSortedLayers)
MCAPI void * $ctor(::BlockPos p, bool immediateChangeRequested, int buildIterationCount, double overrideReadyTime, uchar versionNum, ::std::weak_ptr<::IRenderChunkGarbage > garbage, ::EntityId entityId)
MCAPI void startRebuild(::RenderChunkBuilder &builder, ::Vec3 const &currentCameraPosition)
MCAPI void $dtor()
MCAPI uint64 endFaceSortOnly(::mce::BufferResourceService &bufferResourceService, ::RenderChunkSorter &sorter, ::std::variant< ::std::monostate, ::std::shared_ptr<::RenderChunkDirectIndexData >, ::std::shared_ptr<::RenderChunkLayerGroupIndexData > > &nextIndices, ::std::array<::RangeIndices, 22 > &sortedIndexRange, ::dragon::RenderMetadata const &renderMetadata)
static MCAPI ::std::unique_ptr<::TerrainTextures > & mTerrainTextures()
MCAPI RenderChunkGeometry(::BlockPos p, bool immediateChangeRequested, int buildIterationCount, double overrideReadyTime, uchar versionNum, ::std::weak_ptr<::IRenderChunkGarbage > garbage, ::EntityId entityId)
MCAPI ~RenderChunkGeometry()
Definition RenderChunkSorter.h:5
Definition RenderChunkVertexStreamPlanRegistry.h:7
Definition TerrainTextures.h:5
Definition TextureAtlas.h:5
Definition Vec3.h:10
Definition Mesh.h:7
Definition TextureGroup.h:7
Definition BlockQueueEntry.h:5
Definition RenderChunkDirectIndexData.h:5
Definition RenderChunkDirectVertexData.h:5
Definition RenderChunkLayerGroupIndexData.h:5
Definition RenderChunkLayerGroupVertexData.h:5
Definition RenderChunkQuadInfo.h:5
Definition RenderMetadata.h:7
Definition BufferResourceService.h:7
Definition ServerTexture.h:7
Definition FrameLightingModelCapabilities.h:7