Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleBehavior_FadeOut.h
1#pragma once
2
3#include <ParticlePlugin/Behavior/ParticleBehavior.h>
4
5class PL_PARTICLEPLUGIN_DLL plParticleBehaviorFactory_FadeOut final : public plParticleBehaviorFactory
6{
8
9public:
10 virtual const plRTTI* GetBehaviorType() const override;
11 virtual void CopyBehaviorProperties(plParticleBehavior* pObject, bool bFirstTime) const override;
12
13 virtual void Save(plStreamWriter& inout_stream) const override;
14 virtual void Load(plStreamReader& inout_stream) override;
15
16 // ************************************* PROPERTIES ***********************************
17
18 float m_fStartAlpha = 1.0f;
19 float m_fExponent = 1.0f;
20};
21
22
23class PL_PARTICLEPLUGIN_DLL plParticleBehavior_FadeOut final : public plParticleBehavior
24{
25 PL_ADD_DYNAMIC_REFLECTION(plParticleBehavior_FadeOut, plParticleBehavior);
26
27public:
28 float m_fStartAlpha = 1.0f;
29 float m_fExponent = 1.0f;
30
31 virtual void CreateRequiredStreams() override;
32
33protected:
34 virtual void Process(plUInt64 uiNumElements) override;
35
36 plProcessingStream* m_pStreamLifeTime = nullptr;
37 plProcessingStream* m_pStreamColor = nullptr;
38 plUInt8 m_uiFirstToUpdate = 0;
39 plUInt8 m_uiCurrentUpdateInterval = 2;
40};
Definition ParticleBehavior_FadeOut.h:24
Definition ParticleBehavior_FadeOut.h:6
Base class for all particle behaviors.
Definition ParticleBehavior.h:14
Definition ParticleBehavior.h:30
A single stream in a stream group holding contiguous data of a given type.
Definition ProcessingStream.h:8
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107