LeviLamina
Loading...
Searching...
No Matches
BohrModelRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/renderers/MinecraftUICustomRenderer.h"
7#include "mc/deps/core/math/Vec2.h"
8#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
9
10// auto generated forward declare list
11// clang-format off
12class IClientInstance;
14class RectangleArea;
15class Stopwatch;
16class Tessellator;
17class UIControl;
19class UIScene;
20namespace mce { class Mesh; }
21namespace mce { class TextureGroup; }
22// clang-format on
23
25public:
26 // BohrModelRenderer inner types declare
27 // clang-format off
28 class Renderable;
29 struct State;
30 // clang-format on
31
32 // BohrModelRenderer inner types define
33 class Renderable {
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::mce::Mesh>> mMesh;
38 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mTexture;
39 // NOLINTEND
40 };
41
42 struct State {
43 public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<4, 4, int> mElectrons;
47 ::ll::TypedStorage<4, 4, int> mProtons;
48 ::ll::TypedStorage<4, 4, int> mNeutrons;
49 ::ll::TypedStorage<4, 4, int> mRings;
50 ::ll::TypedStorage<4, 4, float> mScale;
51 ::ll::TypedStorage<4, 8, ::Vec2> mTopLeft;
52 ::ll::TypedStorage<4, 8, ::Vec2> mBottomRight;
53 // NOLINTEND
54 };
55
56public:
57 // member variables
58 // NOLINTBEGIN
59 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Stopwatch>> mStopwatch;
60 ::ll::TypedStorage<4, 36, ::BohrModelRenderer::State> mCurState;
61 ::ll::TypedStorage<4, 36, ::BohrModelRenderer::State> mLastState;
62 ::ll::TypedStorage<4, 4, float> mCenterRadius;
63 ::ll::TypedStorage<4, 4, float> mRingDistance;
64 ::ll::TypedStorage<4, 4, float> mRingThickness;
65 ::ll::TypedStorage<4, 4, float> mMargin;
66 ::ll::TypedStorage<4, 4, float> mElectronSize;
67 ::ll::TypedStorage<4, 4, float> mClumpRadius;
68 ::ll::TypedStorage<4, 4, uint> mProtonSeed;
69 ::ll::TypedStorage<4, 4, uint> mNeutronSeed;
70 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mRingTexture;
71 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mProtonTexture;
72 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mElectronTexture;
73 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mNeutronTexture;
74 ::ll::TypedStorage<8, 24, ::std::vector<::BohrModelRenderer::Renderable>> mRenderables;
75 // NOLINTEND
76
77public:
78 // virtual functions
79 // NOLINTBEGIN
80 virtual ~BohrModelRenderer() /*override*/;
81
82 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
83
84 virtual void render(::MinecraftUIRenderContext& renderContext, ::IClientInstance&, ::UIControl&, int) /*override*/;
85
86 virtual bool update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&) /*override*/;
87 // NOLINTEND
88
89public:
90 // member functions
91 // NOLINTBEGIN
92 MCAPI BohrModelRenderer();
93
94 MCAPI void _extractElectrons(::Tessellator& t, int electrons, ::RectangleArea const& rect);
95
96 MCAPI void _extractParticleClump(::Tessellator& t, int protons, int neutrons, ::RectangleArea const& rect);
97
98 MCAPI void _extractRings(::Tessellator& t, int rings, ::RectangleArea const& rect);
99
100 MCAPI void _loadTextures(::std::shared_ptr<::mce::TextureGroup> textureGroup);
101
102 MCAPI void _renderTick(::MinecraftUIRenderContext& renderContext);
103
104 MCAPI void _updateState(::UIControl& owner);
105 // NOLINTEND
106
107public:
108 // constructor thunks
109 // NOLINTBEGIN
110 MCAPI void* $ctor();
111 // NOLINTEND
112
113public:
114 // destructor thunk
115 // NOLINTBEGIN
116 MCAPI void $dtor();
117 // NOLINTEND
118
119public:
120 // virtual function thunks
121 // NOLINTBEGIN
122 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
123
124 MCAPI void $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance&, ::UIControl&, int);
125
126 MCAPI bool $update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&);
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftable();
133 // NOLINTEND
134};
Definition BohrModelRenderer.h:14
Definition BohrModelRenderer.h:5
static MCAPI void ** $vftable()
Definition IClientInstance.h:5
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition RectangleArea.h:5
Definition Stopwatch.h:5
Definition Tessellator.h:5
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIScene.h:5
Definition Mesh.h:7
Definition TextureGroup.h:7
Definition BohrModelRenderer.h:16