LeviLamina
Loading...
Searching...
No Matches
UIThumbnailAtlasRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/actor/ItemRenderChunkType.h"
7#include "mc/deps/core/checked_resource_service/ClientResourcePointer.h"
8#include "mc/deps/core/math/Color.h"
9#include "mc/deps/core/math/Matrix.h"
10#include "mc/deps/core/resource/ResourceLocation.h"
11#include "mc/deps/core/string/HashedString.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13#include "mc/deps/minecraft_renderer/renderer/Mesh.h"
14#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
15#include "mc/deps/minecraft_renderer/resources/ServerTexture.h"
16#include "mc/world/phys/AABB.h"
17
18// auto generated forward declare list
19// clang-format off
21class BlockType;
22class IClientInstance;
23class ItemRegistryRef;
24class ItemStack;
25class ScreenContext;
26class TaskGroup;
27namespace OreUI { struct AtlasIndex; }
28namespace cg { class ImageBuffer; }
29namespace dragon { class ResolvedImageResource; }
30namespace mce::framebuilder { struct RenderUIMeshDescription; }
31// clang-format on
32
34public:
35 // UIThumbnailAtlasRenderer inner types declare
36 // clang-format off
37 struct AtlasInfo;
38 // clang-format on
39
40 // UIThumbnailAtlasRenderer inner types define
41 struct AtlasInfo {
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<4, 4, float> mScale;
46 ::ll::TypedStorage<8, 8, uint64> mTextureWidth;
47 ::ll::TypedStorage<8, 8, uint64> mTextureHeight;
48 ::ll::TypedStorage<8, 8, uint64> mThumbnailWidth;
49 ::ll::TypedStorage<8, 8, uint64> mThumbnailHeight;
50 ::ll::TypedStorage<4, 4, float> mTranslateX;
51 ::ll::TypedStorage<4, 4, float> mTranslateY;
52 ::ll::TypedStorage<8, 56, ::ResourceLocation> mServerResourceLocation;
53 ::ll::TypedStorage<8, 56, ::ResourceLocation> mAtlasResourceLocation;
54 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mAtlasTexturePtr;
55 ::ll::TypedStorage<8, 8, uint64> mAtlasTexturePtrHash;
56 ::ll::TypedStorage<8, 32, ::std::string> mServerTextureName;
57 // NOLINTEND
58
59 public:
60 // prevent constructor by default
61 AtlasInfo& operator=(AtlasInfo const&);
62 AtlasInfo();
63
64 public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI AtlasInfo(::UIThumbnailAtlasRenderer::AtlasInfo const&);
68
69 MCAPI AtlasInfo(::UIThumbnailAtlasRenderer::AtlasInfo&&);
70
71 MCAPI ~AtlasInfo();
72 // NOLINTEND
73
74 public:
75 // constructor thunks
76 // NOLINTBEGIN
77 MCAPI void* $ctor(::UIThumbnailAtlasRenderer::AtlasInfo const&);
78
79 MCAPI void* $ctor(::UIThumbnailAtlasRenderer::AtlasInfo&&);
80 // NOLINTEND
81
82 public:
83 // destructor thunk
84 // NOLINTBEGIN
85 MCAPI void $dtor();
86 // NOLINTEND
87 };
88
89 using SubstitutionMap = ::std::unordered_map<::HashedString, ::HashedString>;
90
91public:
92 // member variables
93 // NOLINTBEGIN
94 ::ll::TypedStorage<8, 232, ::UIThumbnailAtlasRenderer::AtlasInfo> mAtlasInfo;
95 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
96 ::ll::TypedStorage<8, 24, ::mce::ServerTexture> mServerTexture;
97 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScreenContext>> mScreenContext;
98 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BaseActorRenderContext>> mRenderContext;
99 ::ll::TypedStorage<4, 24, ::AABB> mArea;
100 ::ll::TypedStorage<4, 64, ::Matrix> mWorldMatrix;
101 ::ll::TypedStorage<8, 552, ::mce::Mesh> mMesh;
102 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::framebuilder::RenderUIMeshDescription>> mMeshDescription;
103 ::ll::TypedStorage<4, 16, ::mce::Color> mTint;
104 ::ll::TypedStorage<4, 20, ::std::optional<::glm::vec4>> mClipRegion;
105 ::ll::TypedStorage<8, 8, uint64> mMaxColumns;
106 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::std::unordered_map<::HashedString, ::HashedString>>>
107 mSubstitutions;
108 ::ll::TypedStorage<8, 24, ::mce::ClientResourcePointer<::dragon::ResolvedImageResource>> mTargetImage;
109 // NOLINTEND
110
111public:
112 // prevent constructor by default
113 UIThumbnailAtlasRenderer();
114
115public:
116 // member functions
117 // NOLINTBEGIN
118 MCAPI UIThumbnailAtlasRenderer(
119 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> client,
120 ::UIThumbnailAtlasRenderer::AtlasInfo atlasInfo,
121 ::std::unordered_map<::HashedString, ::HashedString>& substitutions
122 );
123
124 MCAPI void _addItemsToMesh(::OreUI::AtlasIndex& items, float scale);
125
126 MCAPI ::ItemStack _getItemStack(::std::string_view name, ::ItemRegistryRef const& registry) const;
127
128 MCAPI void _initialize(bool isResume, ::UIThumbnailAtlasRenderer::AtlasInfo const& atlasInfo);
129
130 MCAPI bool _isCaptureReady() const;
131
132 MCAPI bool _isNonRenderableBlock(::BlockType const& block) const;
133
134 MCAPI void _render(::ItemStack& item, float scale, float x, float y, ::ItemRenderChunkType renderType);
135
136 MCAPI bool renderOffscreen(
137 ::OreUI::AtlasIndex& items,
138 ::TaskGroup& taskGroup,
139 ::std::function<void(::cg::ImageBuffer&&)>&& callback,
140 bool isResume,
141 ::UIThumbnailAtlasRenderer::AtlasInfo const& atlasInfo
142 );
143
144 MCAPI ~UIThumbnailAtlasRenderer();
145 // NOLINTEND
146
147public:
148 // static functions
149 // NOLINTBEGIN
150 MCAPI static ::std::unique_ptr<::UIThumbnailAtlasRenderer::AtlasInfo> const getItemAtlasInfo();
151 // NOLINTEND
152
153public:
154 // static variables
155 // NOLINTBEGIN
156 MCAPI static int& mRenderCounter();
157 // NOLINTEND
158
159public:
160 // constructor thunks
161 // NOLINTBEGIN
162 MCAPI void* $ctor(
163 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> client,
164 ::UIThumbnailAtlasRenderer::AtlasInfo atlasInfo,
165 ::std::unordered_map<::HashedString, ::HashedString>& substitutions
166 );
167 // NOLINTEND
168
169public:
170 // destructor thunk
171 // NOLINTBEGIN
172 MCAPI void $dtor();
173 // NOLINTEND
174};
Definition BaseActorRenderContext.h:5
Definition BlockType.h:84
Definition IClientInstance.h:5
Definition ItemRegistryRef.h:42
Definition ItemStack.h:35
Definition ScreenContext.h:5
Definition TaskGroup.h:55
Definition UIThumbnailAtlasRenderer.h:5
Definition ImageBuffer.h:16
Definition ResolvedImageResource.h:7
Definition AtlasIndex.h:7
Definition UIThumbnailAtlasRenderer.h:13
Definition RenderUIMeshDescription.h:7