Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleBehavior_PullAlong.h
1#pragma once
2
3#include <ParticlePlugin/Behavior/ParticleBehavior.h>
4
6
7class PL_PARTICLEPLUGIN_DLL plParticleBehaviorFactory_PullAlong final : public plParticleBehaviorFactory
8{
10
11public:
13
14 virtual const plRTTI* GetBehaviorType() const override;
15 virtual void CopyBehaviorProperties(plParticleBehavior* pObject, bool bFirstTime) const override;
16
17 virtual void Save(plStreamWriter& inout_stream) const override;
18 virtual void Load(plStreamReader& inout_stream) override;
19
20 float m_fStrength;
21};
22
23
24class PL_PARTICLEPLUGIN_DLL plParticleBehavior_PullAlong final : public plParticleBehavior
25{
26 PL_ADD_DYNAMIC_REFLECTION(plParticleBehavior_PullAlong, plParticleBehavior);
27
28public:
29 virtual void CreateRequiredStreams() override;
30
31 float m_fStrength = 0.5;
32
33protected:
34 virtual void Process(plUInt64 uiNumElements) override;
35 virtual void StepParticleSystem(const plTime& tDiff, plUInt32 uiNumNewParticles) override;
36
37 bool m_bFirstTime = true;
38 plVec3 m_vLastEmitterPosition;
39 plVec3 m_vApplyPull;
40 plProcessingStream* m_pStreamPosition;
41};
Definition ParticleBehavior_PullAlong.h:25
Definition ParticleBehavior_PullAlong.h:8
Base class for all particle behaviors.
Definition ParticleBehavior.h:14
Definition ParticleBehavior.h:30
Definition PhysicsWorldModule.h:109
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
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12