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
13// auto generated forward declare list
14// clang-format off
15class CustomParticle;
16class HashedString;
17class Level;
18class LightTexture;
19class Particle;
21class ScreenContext;
22class SeasonsRenderer;
23class Vec3;
27namespace ParticleSystem { class ParticleEmitter; }
28// clang-format on
29
31public:
32 // ParticleEngine inner types define
33 using ParticleBin = ::std::vector<::std::unique_ptr<::Particle>>;
34
35 using ParticleTextureMap = ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>;
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 2520, ::std::vector<::std::unique_ptr<::Particle>>[105]> mInactiveParticlesPool;
41 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
42 ::ll::TypedStorage<8, 6720, ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>[105]>
43 mActiveParticles;
44 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomParticle>>> customParticles;
45 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::Particle>>> mNewParticles;
46 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SeasonsRenderer>> mSeasons;
47 ::ll::TypedStorage<8, 8, ::LightTexture&> mLightTexture;
48 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> opaqueMat;
49 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> alphaTestMat;
50 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> blendMat;
51 ::ll::TypedStorage<4, 420, uint[105]> maxParticleCount;
52 ::ll::TypedStorage<4, 420, uint[105]> particleCount;
53 ::ll::TypedStorage<1, 1, bool> mTemporaryCameraActive;
54 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ParticleType, ::HashedString>> mNewParticleSystemJsonLookup;
55 ::ll::TypedStorage<
56 8,
57 64,
58 ::std::unordered_map<
59 ::ParticleType,
60 ::Bedrock::slot_map_handle<::std::unique_ptr<::ParticleSystem::ParticleEmitter>, 64, 32>>>
61 mNewParticleSystemMap;
62 // NOLINTEND
63
64public:
65 // prevent constructor by default
66 ParticleEngine& operator=(ParticleEngine const&);
67 ParticleEngine(ParticleEngine const&);
68 ParticleEngine();
69
70public:
71 // virtual functions
72 // NOLINTBEGIN
73 virtual ~ParticleEngine() /*override*/ = default;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCAPI ParticleEngine(
80 ::Level& level,
81 ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons,
82 ::LightTexture& lightTexture
83 );
84
85 MCAPI void _emitParticleNew(
86 ::ParticleSystemEngine& particleSystemEngine,
87 ::ParticleType type,
88 ::Vec3 const& pos,
89 ::Vec3 const& dir,
90 int data
91 );
92
93 MCAPI ::ParticleLayerRenderObject _extractParticleLayer(
94 ::ScreenContext& screenContext,
95 ::ParticleRenderContext const& particleRenderContext,
96 ::ParticleLayer particleLayer,
97 ::mce::MaterialPtr const& mat
98 ) const;
99
100 MCAPI void addCustomParticle(::std::unique_ptr<::CustomParticle> particle);
101
102 MCAPI void clear();
103
104 MCAPI ::ParticleRenderObjectCollection
105 extract(::ScreenContext& screenContext, ::Vec3 const& cameraPos, ::Vec3 const& viewOff, float minDist) const;
106
107 MCAPI ::ParticleRenderObjectCollection extractEmptyCollection(::ScreenContext& screenContext) const;
108
109 MCAPI void tick();
110 // NOLINTEND
111
112public:
113 // static functions
114 // NOLINTBEGIN
115 MCAPI static void render(::ScreenContext& screenContext, ::ParticleLayerRenderObject const& particleState);
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCAPI void*
122 $ctor(::Level& level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons, ::LightTexture& lightTexture);
123 // NOLINTEND
124};
Definition EnableNonOwnerReferences.h:7
Definition CustomParticle.h:5
Definition HashedString.h:5
Definition Level.h:254
Definition LightTexture.h:5
Definition ParticleEngine.h:5
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