LeviLamina
Loading...
Searching...
No Matches
AtlasImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/geometry_atlas/CommandDispatcherArgs.h"
7#include "mc/client/gui/geometry_atlas/IGeometryAtlas.h"
8#include "mc/client/gui/geometry_atlas/ItemData.h"
9#include "mc/deps/core/threading/BasicLockbox.h"
10#include "mc/deps/core/utility/pub_sub/Connector.h"
11#include "mc/deps/core/utility/pub_sub/Publisher.h"
12#include "mc/external/render_dragon/atlas/AtlasTileDescription.h"
13#include "mc/external/render_dragon/atlas/AtlasTileHandle.h"
14#include "mc/platform/brstd/flat_set.h"
15
16// auto generated forward declare list
17// clang-format off
18namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
19namespace Bedrock::Threading { class Mutex; }
20namespace GeometryAtlas { class IItemTile; }
21namespace GeometryAtlas { class IRenderContext; }
22namespace GeometryAtlas { struct AllocateAtlasPayload; }
23namespace GeometryAtlas { struct AllocateBackendPayload; }
24namespace GeometryAtlas { struct RenderableUpdateCommand; }
25namespace GeometryAtlas { struct TileDefinition; }
26namespace GeometryAtlas { struct UIItemPayload; }
27namespace dragon::atlas { class IAtlasHandle; }
28// clang-format on
29
30namespace GeometryAtlas {
31
32class AtlasImpl : public ::GeometryAtlas::IGeometryAtlas {
33public:
34 // AtlasImpl inner types declare
35 // clang-format off
36 struct TileEntry;
37 struct Data;
38 struct CommandArgs;
39 struct mDispatcher;
40 // clang-format on
41
42 // AtlasImpl inner types define
43 struct TileEntry {
44 public:
45 // TileEntry inner types define
46 using Variant = ::std::variant<::GeometryAtlas::ItemData>;
47
48 public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<8, 56, ::std::variant<::GeometryAtlas::ItemData>> mData;
52 ::ll::TypedStorage<8, 24, ::dragon::atlas::AtlasTileHandle> mBackendID;
53 ::ll::TypedStorage<4, 8, ::dragon::atlas::AtlasTileDescription> mTileDescription;
54 ::ll::TypedStorage<1, 1, bool> mIsAnimated;
55 // NOLINTEND
56 };
57
58 struct Data {
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::dragon::atlas::IAtlasHandle>> mAtlas;
63 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint, ::GeometryAtlas::AtlasImpl::TileEntry>> mTiles;
64 ::ll::TypedStorage<
65 8,
66 120,
67 ::Bedrock::Threading::
68 BasicLockbox<::std::deque<::GeometryAtlas::RenderableUpdateCommand>, ::Bedrock::Threading::Mutex>>
69 mCommands;
70 ::ll::TypedStorage<8, 24, ::std::vector<::GeometryAtlas::RenderableUpdateCommand>> mFutureCommands;
71 ::ll::TypedStorage<8, 24, ::brstd::flat_set<uint, ::std::less<uint>, ::std::vector<uint>>> mDirtyTiles;
72 ::ll::TypedStorage<8, 24, ::std::vector<uint>> mTileNotifications;
73 // NOLINTEND
74
75 public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI ~Data();
79 // NOLINTEND
80
81 public:
82 // destructor thunk
83 // NOLINTBEGIN
84 MCAPI void $dtor();
85 // NOLINTEND
86 };
87
88 struct CommandArgs {
89 public:
90 // member variables
91 // NOLINTBEGIN
92 ::ll::TypedStorage<8, 8, ::GeometryAtlas::IRenderContext&> mContext;
93 ::ll::TypedStorage<
94 8,
95 8,
96 ::std::_List_iterator<::std::_List_val<
97 ::std::_List_simple_types<::std::pair<uint const, ::GeometryAtlas::AtlasImpl::TileEntry>>>>>
98 mIt;
99 ::ll::TypedStorage<8, 8, ::GeometryAtlas::AtlasImpl::TileEntry*> mEntry;
100 ::ll::TypedStorage<4, 4, uint> mTileID;
101 // NOLINTEND
102
103 public:
104 // prevent constructor by default
105 CommandArgs& operator=(CommandArgs const&);
106 CommandArgs(CommandArgs const&);
107 CommandArgs();
108 };
109
110 struct mDispatcher {};
111
112 using CommandBuffer = ::std::deque<::GeometryAtlas::RenderableUpdateCommand>;
113
114public:
115 // member variables
116 // NOLINTBEGIN
117 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GeometryAtlas::AtlasImpl::Data>> mData;
118 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GeometryAtlas::CommandDispatcherArgs::DispatchFunctions>> mDispatcher;
119 ::ll::TypedStorage<
120 8,
121 128,
122 ::Bedrock::PubSub::
123 Publisher<void(::std::vector<uint> const&), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
124 mTileChangePublisher;
125 // NOLINTEND
126
127public:
128 // virtual functions
129 // NOLINTBEGIN
130 virtual ::std::shared_ptr<::GeometryAtlas::IItemTile>
131 createItem(::GeometryAtlas::TileDefinition const& definition) /*override*/;
132
133 virtual void trySubmitUpdates(::GeometryAtlas::IRenderContext& context) /*override*/;
134
135 virtual ::Bedrock::PubSub::Connector<void(::std::vector<uint> const&)>& getTileChangeConnector() /*override*/;
136 // NOLINTEND
137
138public:
139 // member functions
140 // NOLINTBEGIN
141 MCAPI AtlasImpl();
142
143 MCAPI void _processAllCommands(::GeometryAtlas::IRenderContext& context);
144
146
148
149 MCAPI void _processCommand(::GeometryAtlas::AtlasImpl::CommandArgs& args, ::GeometryAtlas::UIItemPayload&& payload);
150
151 MCAPI void _submitTileRenders(::GeometryAtlas::IRenderContext& context);
152 // NOLINTEND
153
154public:
155 // constructor thunks
156 // NOLINTBEGIN
157 MCAPI void* $ctor();
158 // NOLINTEND
159
160public:
161 // virtual function thunks
162 // NOLINTBEGIN
163 MCAPI ::std::shared_ptr<::GeometryAtlas::IItemTile> $createItem(::GeometryAtlas::TileDefinition const& definition);
164
165 MCAPI void $trySubmitUpdates(::GeometryAtlas::IRenderContext& context);
166
167 MCFOLD ::Bedrock::PubSub::Connector<void(::std::vector<uint> const&)>& $getTileChangeConnector();
168 // NOLINTEND
169
170public:
171 // vftables
172 // NOLINTBEGIN
173 MCNAPI static void** $vftable();
174 // NOLINTEND
175};
176
177} // namespace GeometryAtlas
Definition Mutex.h:10
Definition AtlasImpl.h:7
static MCAPI void ** $vftable()
Definition IItemTile.h:7
Definition IRenderContext.h:7
Definition IAtlasHandle.h:7
Definition AllocateAtlasPayload.h:7
Definition AllocateBackendPayload.h:7
Definition AtlasImpl.h:21
Definition AtlasImpl.h:19
Definition AtlasImpl.h:17
Definition AtlasImpl.h:110
Definition RenderableUpdateCommand.h:7
Definition TileDefinition.h:7
Definition UIItemPayload.h:7
Definition context.h:5