Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleBehavior_Flies.h
1#pragma once
2
3#include <ParticlePlugin/Behavior/ParticleBehavior.h>
4
5class PL_PARTICLEPLUGIN_DLL plParticleBehaviorFactory_Flies final : public plParticleBehaviorFactory
6{
8
9public:
12
13 virtual const plRTTI* GetBehaviorType() const override;
14 virtual void CopyBehaviorProperties(plParticleBehavior* pObject, bool bFirstTime) const override;
15
16 virtual void QueryFinalizerDependencies(plSet<const plRTTI*>& inout_finalizerDeps) const override;
17
18 virtual void Save(plStreamWriter& inout_stream) const override;
19 virtual void Load(plStreamReader& inout_stream) override;
20
21 float m_fSpeed = 0.2f;
22 float m_fPathLength = 0.2f;
23 float m_fMaxEmitterDistance = 0.5f;
24 plAngle m_MaxSteeringAngle = plAngle::MakeFromDegree(30);
25};
26
27
28class PL_PARTICLEPLUGIN_DLL plParticleBehavior_Flies final : public plParticleBehavior
29{
30 PL_ADD_DYNAMIC_REFLECTION(plParticleBehavior_Flies, plParticleBehavior);
31
32public:
33 virtual void CreateRequiredStreams() override;
34
35 float m_fSpeed = 0.2f;
36 float m_fPathLength = 0.2f;
37 float m_fMaxEmitterDistance = 0.5f;
38 plAngle m_MaxSteeringAngle = plAngle::MakeFromDegree(30);
39
40protected:
41 virtual void Process(plUInt64 uiNumElements) override;
42
43 plProcessingStream* m_pStreamPosition = nullptr;
44 plProcessingStream* m_pStreamVelocity = nullptr;
45
46 plTime m_TimeToChangeDir;
47};
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
static constexpr plAngle MakeFromDegree(float fDegree)
Creates an instance of plAngle that was initialized from degree. (Performs a conversion)
Definition Angle_inl.h:33
Definition ParticleBehavior_Flies.h:29
Definition ParticleBehavior_Flies.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
Definition Set.h:238
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