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