LeviLamina
Loading...
Searching...
No Matches
ParticleEngine.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/particle/ParticleLayer.h"
7#include "mc/comprehensive/ParticleType.h"
8#include "mc/deps/core/container/slot_map_handle.h"
9#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
12#include "mc/util/Random.h"
13
14// auto generated forward declare list
15// clang-format off
17class CompoundTag;
18class CustomParticle;
19class HashedString;
20class Level;
21class LightTexture;
22class Particle;
24class ScreenContext;
25class SeasonsRenderer;
26class Vec3;
30namespace ParticleSystem { class ParticleEmitter; }
31// clang-format on
32
34public:
35 // ParticleEngine inner types define
36 using ParticleBin = ::std::vector<::std::unique_ptr<::Particle>>;
37
38 using ParticleTextureMap = ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>;
39
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<8, 2448, ::std::vector<::std::unique_ptr<::Particle>>[102]> mInactiveParticlesPool;
44 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
45 ::ll::TypedStorage<8, 6528, ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>[102]>
46 mActiveParticles;
47 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomParticle>>> customParticles;
48 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::Particle>>> mNewParticles;
49 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SeasonsRenderer>> mSeasons;
50 ::ll::TypedStorage<8, 8, ::LightTexture&> mLightTexture;
51 ::ll::TypedStorage<8, 2544, ::Random> random;
52 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> opaqueMat;
53 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> alphaTestMat;
54 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> blendMat;
55 ::ll::TypedStorage<4, 408, uint[102]> maxParticleCount;
56 ::ll::TypedStorage<4, 408, uint[102]> particleCount;
57 ::ll::TypedStorage<1, 1, bool> mTemporaryCameraActive;
58 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ParticleType, ::HashedString>> mNewParticleSystemJsonLookup;
59 ::ll::TypedStorage<
60 8,
61 64,
62 ::std::unordered_map<
63 ::ParticleType,
64 ::Bedrock::slot_map_handle<::std::unique_ptr<::ParticleSystem::ParticleEmitter>, 64, 32>>>
65 mNewParticleSystemMap;
66 // NOLINTEND
67
68public:
69 // prevent constructor by default
70 ParticleEngine& operator=(ParticleEngine const&);
71 ParticleEngine(ParticleEngine const&);
72 ParticleEngine();
73
74public:
75 // virtual functions
76 // NOLINTBEGIN
77 virtual ~ParticleEngine() /*override*/;
78 // NOLINTEND
79
80public:
81 // member functions
82 // NOLINTBEGIN
83 MCAPI ParticleEngine(
84 ::Level& level,
85 ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons,
86 ::LightTexture& lightTexture
87 );
88
89 MCAPI ::std::unique_ptr<::Particle> _create(::ParticleType type);
90
91 MCAPI void _emitParticleNew(
92 ::ParticleSystemEngine& particleSystemEngine,
93 ::ParticleType type,
94 ::Vec3 const& pos,
95 ::Vec3 const& dir,
96 int data
97 );
98
99 MCAPI ::ParticleLayerRenderObject _extractParticleLayer(
100 ::ScreenContext& screenContext,
101 ::ParticleRenderContext const& particleRenderContext,
102 ::ParticleLayer particleLayer,
103 ::mce::MaterialPtr const& mat
104 ) const;
105
106 MCAPI void addCustomParticle(::std::unique_ptr<::CustomParticle> particle);
107
108 MCAPI void clear();
109
110 MCAPI ::ParticleRenderObjectCollection
111 extract(::ScreenContext& screenContext, ::Vec3 const& cameraPos, ::Vec3 const& viewOff, float minDist) const;
112
113 MCAPI ::ParticleRenderObjectCollection extractEmptyCollection(::ScreenContext& screenContext) const;
114
115 MCAPI ::gsl::final_action<::std::function<void()>> forceTessellationForTemporaryCamera();
116
117 MCAPI ::Particle* instance(
118 ::ParticleType type,
119 ::Vec3 const& pos,
120 ::Vec3 const& dir,
121 int data,
122 ::ParticleSystemEngine* particleSystemEngine,
123 ::CompoundTag const* tag
124 );
125
126 MCAPI void onDimensionChanged();
127
128 MCAPI void renderCustomParticles(::BaseActorRenderContext& renderContext, ::Vec3 const& viewOff, float minDist);
129
130 MCAPI void tick();
131 // NOLINTEND
132
133public:
134 // static functions
135 // NOLINTBEGIN
136 MCAPI static void render(::ScreenContext& screenContext, ::ParticleLayerRenderObject const& particleState);
137 // NOLINTEND
138
139public:
140 // constructor thunks
141 // NOLINTBEGIN
142 MCAPI void*
143 $ctor(::Level& level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons, ::LightTexture& lightTexture);
144 // NOLINTEND
145
146public:
147 // destructor thunk
148 // NOLINTBEGIN
149 MCAPI void $dtor();
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
155 MCNAPI static void** $vftable();
156 // NOLINTEND
157};
Definition BaseActorRenderContext.h:5
Definition EnableNonOwnerReferences.h:7
Definition CompoundTag.h:23
Definition CustomParticle.h:5
Definition HashedString.h:5
Definition Level.h:255
Definition LightTexture.h:5
Definition ParticleEngine.h:5
static MCAPI void ** $vftable()
Definition ParticleSystemEngine.h:5
Definition ParticleEmitter.h:7
Definition Particle.h:5
Definition ScreenContext.h:5
Definition SeasonsRenderer.h:5
Definition Vec3.h:10
Definition ParticleLayerRenderObject.h:5
Definition ParticleRenderContext.h:5
Definition ParticleRenderObjectCollection.h:5