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 IClientInstance;
22class ItemRegistryRef;
23class ItemStack;
24class ScreenContext;
25class TaskGroup;
26namespace OreUI { struct AtlasIndex; }
27namespace cg { class ImageBuffer; }
28namespace dragon { class ResolvedImageResource; }
29namespace mce::framebuilder { struct RenderUIMeshDescription; }
30// clang-format on
31
33public:
34 // UIThumbnailAtlasRenderer inner types declare
35 // clang-format off
36 struct AtlasInfo;
37 // clang-format on
38
39 // UIThumbnailAtlasRenderer inner types define
40 struct AtlasInfo {
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<4, 4, float> mScale;
45 ::ll::TypedStorage<8, 8, uint64> mTextureWidth;
46 ::ll::TypedStorage<8, 8, uint64> mTextureHeight;
47 ::ll::TypedStorage<8, 8, uint64> mThumbnailWidth;
48 ::ll::TypedStorage<8, 8, uint64> mThumbnailHeight;
49 ::ll::TypedStorage<4, 4, float> mTranslateX;
50 ::ll::TypedStorage<4, 4, float> mTranslateY;
51 ::ll::TypedStorage<8, 56, ::ResourceLocation> mServerResourceLocation;
52 ::ll::TypedStorage<8, 56, ::ResourceLocation> mAtlasResourceLocation;
53 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mAtlasTexturePtr;
54 ::ll::TypedStorage<8, 8, uint64> mAtlasTexturePtrHash;
55 ::ll::TypedStorage<8, 32, ::std::string> mServerTextureName;
56 // NOLINTEND
57
58 public:
59 // prevent constructor by default
60 AtlasInfo& operator=(AtlasInfo const&);
61
62 public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI AtlasInfo();
66
67 MCAPI AtlasInfo(::UIThumbnailAtlasRenderer::AtlasInfo const&);
68
69 MCAPI ~AtlasInfo();
70 // NOLINTEND
71
72 public:
73 // constructor thunks
74 // NOLINTBEGIN
75 MCAPI void* $ctor();
76
77 MCAPI void* $ctor(::UIThumbnailAtlasRenderer::AtlasInfo const&);
78 // NOLINTEND
79
80 public:
81 // destructor thunk
82 // NOLINTBEGIN
83 MCAPI void $dtor();
84 // NOLINTEND
85 };
86
87 using SubstitutionMap = ::std::unordered_map<::HashedString, ::HashedString>;
88
89public:
90 // member variables
91 // NOLINTBEGIN
92 ::ll::TypedStorage<8, 232, ::UIThumbnailAtlasRenderer::AtlasInfo> mAtlasInfo;
93 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
94 ::ll::TypedStorage<8, 24, ::mce::ServerTexture> mServerTexture;
95 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScreenContext>> mScreenContext;
96 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BaseActorRenderContext>> mRenderContext;
97 ::ll::TypedStorage<4, 24, ::AABB> mArea;
98 ::ll::TypedStorage<4, 64, ::Matrix> mWorldMatrix;
99 ::ll::TypedStorage<8, 528, ::mce::Mesh> mMesh;
100 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::framebuilder::RenderUIMeshDescription>> mMeshDescription;
101 ::ll::TypedStorage<4, 16, ::mce::Color> mTint;
102 ::ll::TypedStorage<4, 20, ::std::optional<::glm::vec4>> mClipRegion;
103 ::ll::TypedStorage<8, 8, uint64> mMaxColumns;
104 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::std::unordered_map<::HashedString, ::HashedString>>>
105 mSubstitutions;
106 ::ll::TypedStorage<8, 24, ::mce::ClientResourcePointer<::dragon::ResolvedImageResource>> mTargetImage;
107 // NOLINTEND
108
109public:
110 // prevent constructor by default
111 UIThumbnailAtlasRenderer();
112
113public:
114 // member functions
115 // NOLINTBEGIN
116 MCAPI UIThumbnailAtlasRenderer(
117 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> client,
118 ::UIThumbnailAtlasRenderer::AtlasInfo atlasInfo,
119 ::std::unordered_map<::HashedString, ::HashedString>& substitutions
120 );
121
122 MCAPI void _addItemsToMesh(::OreUI::AtlasIndex& items, float scale);
123
124 MCAPI void _capture(::mce::framebuilder::RenderUIMeshDescription&& description);
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 void _render(::ItemStack& item, float scale, float x, float y, ::ItemRenderChunkType renderType);
131
132 MCAPI bool renderOffscreen(
133 ::OreUI::AtlasIndex& items,
134 ::TaskGroup& taskGroup,
135 ::std::function<void(::cg::ImageBuffer&&)>&& callback,
136 bool isResume,
137 ::UIThumbnailAtlasRenderer::AtlasInfo const& atlasInfo
138 );
139
140 MCAPI ~UIThumbnailAtlasRenderer();
141 // NOLINTEND
142
143public:
144 // static variables
145 // NOLINTBEGIN
146 MCAPI static int& mRenderCounter();
147 // NOLINTEND
148
149public:
150 // constructor thunks
151 // NOLINTBEGIN
152 MCAPI void* $ctor(
153 ::Bedrock::NotNullNonOwnerPtr<::IClientInstance> client,
154 ::UIThumbnailAtlasRenderer::AtlasInfo atlasInfo,
155 ::std::unordered_map<::HashedString, ::HashedString>& substitutions
156 );
157 // NOLINTEND
158
159public:
160 // destructor thunk
161 // NOLINTBEGIN
162 MCAPI void $dtor();
163 // NOLINTEND
164};
Definition BaseActorRenderContext.h:5
Definition IClientInstance.h:5
Definition ItemRegistryRef.h:36
Definition ItemStack.h:26
Definition ScreenContext.h:5
Definition TaskGroup.h:57
Definition UIThumbnailAtlasRenderer.h:5
Definition ImageBuffer.h:16
Definition ResolvedImageResource.h:7
Definition AtlasIndex.h:7
Definition UIThumbnailAtlasRenderer.h:13
Definition RenderUIMeshDescription.h:7