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