Skip to content
LeviMC
English
AutoLightDark
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 CompoundTag;
16class CustomParticle;
17class HashedString;
18class Level;
19class LightTexture;
20class Particle;
22class ScreenContext;
23class SeasonsRenderer;
24class Vec3;
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, 2544, ::std::vector<::std::unique_ptr<::Particle>>[106]> mInactiveParticlesPool;
42 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
43 ::ll::TypedStorage<8, 6784, ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>[106]>
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, 16, ::mce::MaterialPtr> opaqueMat;
50 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> alphaTestMat;
51 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> blendMat;
52 ::ll::TypedStorage<4, 424, uint[106]> maxParticleCount;
53 ::ll::TypedStorage<4, 424, uint[106]> particleCount;
54 ::ll::TypedStorage<1, 1, bool> mTemporaryCameraActive;
55 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ParticleType, ::HashedString>> mNewParticleSystemJsonLookup;
56 ::ll::TypedStorage<
57 8,
58 64,
59 ::std::unordered_map<
60 ::ParticleType,
61 ::Bedrock::slot_map_handle<::std::unique_ptr<::ParticleSystem::ParticleEmitter>, 64, 32>>>
62 mNewParticleSystemMap;
63 // NOLINTEND
64
65public:
66 // prevent constructor by default
67 ParticleEngine& operator=(ParticleEngine const&);
68 ParticleEngine(ParticleEngine const&);
69 ParticleEngine();
70
71public:
72 // virtual functions
73 // NOLINTBEGIN
74 virtual ~ParticleEngine() /*override*/ = default;
75 // NOLINTEND
76
77public:
78 // member functions
79 // NOLINTBEGIN
81 ::Level& level,
82 ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons,
83 ::LightTexture& lightTexture
84 );
85
86 MCNAPI ::std::unique_ptr<::Particle> _create(::ParticleType type);
87
88 MCAPI void _emitParticleNew(
89 ::ParticleSystemEngine& particleSystemEngine,
90 ::ParticleType type,
91 ::Vec3 const& pos,
92 ::Vec3 const& dir,
93 int data
94 );
95
96 MCNAPI ::ParticleLayerRenderObject _extractParticleLayer(
97 ::ScreenContext& screenContext,
98 ::ParticleRenderContext const& particleRenderContext,
99 ::ParticleLayer particleLayer,
100 ::mce::MaterialPtr const& mat
101 ) const;
102
103 MCNAPI void addCustomParticle(::std::unique_ptr<::CustomParticle> particle);
104
105 MCAPI void clear();
106
107 MCNAPI ::ParticleRenderObjectCollection
108 extract(::ScreenContext& screenContext, ::Vec3 const& cameraPos, ::Vec3 const& viewOff, float minDist) const;
109
110 MCNAPI ::ParticleRenderObjectCollection extractEmptyCollection(::ScreenContext& screenContext) const;
111
112 MCNAPI ::Particle* instance(
113 ::ParticleType type,
114 ::Vec3 const& pos,
115 ::Vec3 const& dir,
116 int data,
117 ::ParticleSystemEngine* particleSystemEngine,
118 ::CompoundTag const* tag
119 );
120
121 MCNAPI void tick();
122 // NOLINTEND
123
124public:
125 // static functions
126 // NOLINTBEGIN
127 MCAPI static void render(::ScreenContext& screenContext, ::ParticleLayerRenderObject const& particleState);
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133 MCNAPI void*
134 $ctor(::Level& level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons, ::LightTexture& lightTexture);
135 // NOLINTEND
136};
Definition EnableNonOwnerReferences.h:7
Definition CompoundTag.h:18
Definition CustomParticle.h:5
Definition HashedString.h:5
Definition Level.h:255
Definition LightTexture.h:5
Definition ParticleEngine.h:5
MCAPI::ParticleLayerRenderObject _extractParticleLayer(::ScreenContext &screenContext, ::ParticleRenderContext const &particleRenderContext, ::ParticleLayer particleLayer, ::mce::MaterialPtr const &mat) const
MCAPI ::std::unique_ptr<::Particle > _create(::ParticleType type)
MCAPI void addCustomParticle(::std::unique_ptr<::CustomParticle > particle)
MCAPI::ParticleRenderObjectCollection extract(::ScreenContext &screenContext, ::Vec3 const &cameraPos, ::Vec3 const &viewOff, float minDist) const
MCAPI::ParticleRenderObjectCollection extractEmptyCollection(::ScreenContext &screenContext) const
MCAPI::Particle * instance(::ParticleType type, ::Vec3 const &pos, ::Vec3 const &dir, int data, ::ParticleSystemEngine *particleSystemEngine, ::CompoundTag const *tag)
MCAPI ParticleEngine(::Level &level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer > seasons, ::LightTexture &lightTexture)
MCAPI void * $ctor(::Level &level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer > seasons, ::LightTexture &lightTexture)
MCAPI void tick()
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 MaterialPtr.h:14
Definition ParticleLayerRenderObject.h:5
Definition ParticleRenderContext.h:5
Definition ParticleRenderObjectCollection.h:5