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
16class CompoundTag;
17class HashedString;
18class Level;
19class LightTexture;
20class Particle;
22class ScreenContext;
23class Vec3;
24struct CustomParticle;
27struct SeasonsRenderer;
28namespace ParticleSystem { class ParticleEmitter; }
29// clang-format on
30
32public:
33 // ParticleEngine inner types define
34 using ParticleBin = ::std::vector<::std::unique_ptr<::Particle>>;
35
36 using ParticleTextureMap = ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>;
37
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 2376, ::std::vector<::std::unique_ptr<::Particle>>[99]> mInactiveParticlesPool;
42 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
43 ::ll::TypedStorage<8, 6336, ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>[99]>
44 mActiveParticles;
45 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomParticle>>> customParticles;
46 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::Particle>>> mNewParticles;
47 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SeasonsRenderer>> mSeasons;
48 ::ll::TypedStorage<8, 8, ::LightTexture&> mLightTexture;
49 ::ll::TypedStorage<8, 2576, ::Random> random;
50 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> opaqueMat;
51 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> alphaTestMat;
52 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> blendMat;
53 ::ll::TypedStorage<4, 396, uint[99]> maxParticleCount;
54 ::ll::TypedStorage<4, 396, uint[99]> particleCount;
55 ::ll::TypedStorage<1, 1, bool> mTemporaryCameraActive;
56 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ParticleType, ::HashedString>> mNewParticleSystemJsonLookup;
57 ::ll::TypedStorage<
58 8,
59 64,
60 ::std::unordered_map<
61 ::ParticleType,
62 ::Bedrock::slot_map_handle<::std::unique_ptr<::ParticleSystem::ParticleEmitter>, 64, 32>>>
63 mNewParticleSystemMap;
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 ParticleEngine& operator=(ParticleEngine const&);
69 ParticleEngine(ParticleEngine const&);
70 ParticleEngine();
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 virtual ~ParticleEngine() /*override*/;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI ParticleEngine(
82 ::Level& level,
83 ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons,
84 ::LightTexture& lightTexture
85 );
86
87 MCAPI ::std::unique_ptr<::Particle> _create(::ParticleType type);
88
89 MCAPI void _emitParticleNew(
90 ::ParticleSystemEngine& particleSystemEngine,
91 ::ParticleType type,
92 ::Vec3 const& pos,
93 ::Vec3 const& dir,
94 int data
95 );
96
97 MCAPI ::ParticleLayerRenderObject _extractParticleLayer(
98 ::ScreenContext& screenContext,
99 ::ParticleRenderContext const& particleRenderContext,
100 ::ParticleLayer particleLayer,
101 ::mce::MaterialPtr const& mat
102 ) const;
103
104 MCAPI void addCustomParticle(::std::unique_ptr<::CustomParticle> particle);
105
106 MCAPI void clear();
107
108 MCAPI ::Particle* instance(
109 ::ParticleType type,
110 ::Vec3 const& pos,
111 ::Vec3 const& dir,
112 int data,
113 ::ParticleSystemEngine* particleSystemEngine,
114 ::CompoundTag const* tag
115 );
116
117 MCAPI void tick();
118 // NOLINTEND
119
120public:
121 // static functions
122 // NOLINTBEGIN
123 MCAPI static void render(::ScreenContext& screenContext, ::ParticleLayerRenderObject const& particleState);
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void*
130 $ctor(::Level& level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons, ::LightTexture& lightTexture);
131 // NOLINTEND
132
133public:
134 // destructor thunk
135 // NOLINTBEGIN
136 MCAPI void $dtor();
137 // NOLINTEND
138
139public:
140 // vftables
141 // NOLINTBEGIN
142 MCNAPI static void** $vftable();
143 // NOLINTEND
144};
Definition EnableNonOwnerReferences.h:7
Definition CompoundTag.h:23
Definition HashedString.h:5
Definition Level.h:249
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 Vec3.h:10
Definition CustomParticle.h:5
Definition ParticleLayerRenderObject.h:5
Definition ParticleRenderContext.h:5
Definition SeasonsRenderer.h:5