LeviLamina
Loading...
Searching...
No Matches
Particle.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/client/renderer/texture/TextureUVCoordinateSet.h"
8#include "mc/common/BrightnessPair.h"
9#include "mc/comprehensive/ParticleType.h"
10#include "mc/deps/core/math/Color.h"
11#include "mc/deps/core/math/Vec3.h"
12#include "mc/world/phys/AABB.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class BlockSource;
18class CompoundTag;
19class ParticleEngine;
20class Vec2;
22namespace mce { class TextureGroup; }
23namespace mce { class TexturePtr; }
24// clang-format on
25
26class Particle {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 4, float> mCameraOffset;
31 ::ll::TypedStorage<4, 4, int> mLifetime;
32 ::ll::TypedStorage<8, 88, ::TextureUVCoordinateSet> mTex;
33 ::ll::TypedStorage<4, 4, float> mU0;
34 ::ll::TypedStorage<4, 4, float> mV0;
35 ::ll::TypedStorage<4, 4, int> mAge;
36 ::ll::TypedStorage<4, 4, int> mTicksSinceLastUpdate;
37 ::ll::TypedStorage<4, 4, float> mSize;
38 ::ll::TypedStorage<4, 4, float> mGravity;
39 ::ll::TypedStorage<4, 16, ::mce::Color> mColor;
40 ::ll::TypedStorage<4, 16, ::mce::Color> mVanillaLightColor;
41 ::ll::TypedStorage<1, 2, ::BrightnessPair> mAmbientLight;
42 ::ll::TypedStorage<4, 4, ::ParticleType> mType;
43 ::ll::TypedStorage<4, 4, ::ParticleLayer> mLayer;
44 ::ll::TypedStorage<1, 1, bool> mUnlit;
45 ::ll::TypedStorage<4, 4, float> mRoll;
46 ::ll::TypedStorage<4, 4, float> mORoll;
47 ::ll::TypedStorage<4, 4, float> mXa;
48 ::ll::TypedStorage<4, 4, float> mZa;
49 ::ll::TypedStorage<4, 4, float> mXa2;
50 ::ll::TypedStorage<4, 4, float> mZa2;
51 ::ll::TypedStorage<4, 4, float> mYa;
52 ::ll::TypedStorage<8, 8, ::BlockSource*> mRegion;
53 ::ll::TypedStorage<4, 12, ::Vec3> mPosDelta;
54 ::ll::TypedStorage<4, 12, ::Vec3> mPos;
55 ::ll::TypedStorage<4, 12, ::Vec3> mPosOld;
56 ::ll::TypedStorage<1, 1, bool> mNoPhysics;
57 ::ll::TypedStorage<1, 1, bool> mOnGround;
58 ::ll::TypedStorage<1, 1, bool> mVertexDataInitialized;
59 ::ll::TypedStorage<4, 24, ::AABB> mBB;
60 // NOLINTEND
61
62public:
63 // prevent constructor by default
64 Particle();
65
66public:
67 // virtual functions
68 // NOLINTBEGIN
69 virtual ~Particle();
70
71 virtual void init(::Vec3 const& pos, ::Vec3 const& dir, int scale, ::ParticleEngine& engine) = 0;
72
73 virtual void addTagData(::CompoundTag const& tag);
74
75 virtual void normalTick();
76
77 virtual void tessellate(::ParticleRenderContext const& renderContext);
78
79 virtual ::mce::TexturePtr const& getParticleTexture() const;
80
81 virtual void setEmittingEntity(::Actor& entity);
82
83 virtual bool _shouldUpdateVertexData(float sqDist);
84
85 virtual void _calculateAmbientLight(float a);
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
91 MCAPI Particle(::BlockSource& source, ::ParticleType type);
92
93 MCAPI void _generateVertexOffsets(
94 ::Vec3 const& cameraPos,
95 float& out_xa,
96 float& out_za,
97 float& out_xa2,
98 float& out_za2,
99 float& out_ya
100 );
101
102 MCAPI void
103 _init(::Vec3 const& pos, ::Vec3 const& dir, int scale, ::ParticleEngine& engine, ::CompoundTag const* tag);
104
105 MCAPI void move(::Vec3 const& delta);
106 // NOLINTEND
107
108public:
109 // static functions
110 // NOLINTBEGIN
111 MCAPI static void initStaticResources(::std::shared_ptr<::mce::TextureGroup> textureGroup);
112
113 MCAPI static ::Vec2 packLighting(::BrightnessPair const& ambientLighting, ::mce::Color const& lightColor);
114 // NOLINTEND
115
116public:
117 // static variables
118 // NOLINTBEGIN
119 MCAPI static ::mce::TexturePtr& FLAME_ATLAS();
120
121 MCAPI static ::mce::TexturePtr& FORCEFIELD_ATLAS();
122
123 MCAPI static ::mce::TexturePtr& ITEMS_ATLAS();
124
125 MCAPI static ::mce::TexturePtr& PARTICLE_ATLAS();
126
127 MCAPI static ::mce::TexturePtr& TERRAIN_ATLAS();
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133 MCAPI void* $ctor(::BlockSource& source, ::ParticleType type);
134 // NOLINTEND
135
136public:
137 // destructor thunk
138 // NOLINTBEGIN
139 MCAPI void $dtor();
140 // NOLINTEND
141
142public:
143 // virtual function thunks
144 // NOLINTBEGIN
145 MCFOLD void $addTagData(::CompoundTag const& tag);
146
147 MCAPI void $normalTick();
148
149 MCAPI void $tessellate(::ParticleRenderContext const& renderContext);
150
151 MCFOLD ::mce::TexturePtr const& $getParticleTexture() const;
152
153 MCFOLD void $setEmittingEntity(::Actor& entity);
154
155 MCAPI bool $_shouldUpdateVertexData(float sqDist);
156
157 MCAPI void $_calculateAmbientLight(float a);
158 // NOLINTEND
159
160public:
161 // vftables
162 // NOLINTBEGIN
163 MCNAPI static void** $vftable();
164 // NOLINTEND
165};
Definition Actor.h:106
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition ParticleEngine.h:5
Definition Particle.h:5
static MCAPI void ** $vftable()
Definition Vec2.h:5
Definition TextureGroup.h:7
Definition TexturePtr.h:19
Definition ParticleRenderContext.h:5