Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleEffectController.h
1#pragma once
2
3#include <ParticlePlugin/Effect/ParticleEffectInstance.h>
4#include <ParticlePlugin/ParticlePluginDLL.h>
5
6class PL_PARTICLEPLUGIN_DLL plParticleEffectController
7{
8public:
11 void operator=(const plParticleEffectController& rhs);
12
13 void Create(const plParticleEffectResourceHandle& hEffectResource, plParticleWorldModule* pModule, plUInt64 uiRandomSeed,
14 const char* szSharedName /*= nullptr*/, const void* pSharedInstanceOwner /*= nullptr*/, plArrayPtr<plParticleEffectFloatParam> floatParams,
16
17 bool IsValid() const;
18 void Invalidate();
19
20 bool IsAlive() const;
21 bool IsSharedInstance() const { return m_pSharedInstanceOwner != nullptr; }
22
23 bool IsContinuousEffect() const { return GetInstance()->IsContinuous(); }
24
25 void SetTransform(const plTransform& t, const plVec3& vParticleStartVelocity) const;
26
27 void CombineSystemBoundingVolumes();
28
29 void Tick(const plTime& diff) const;
30
31 void ExtractRenderData(plMsgExtractRenderData& ref_msg, const plTransform& systemTransform) const;
32
33 void StopImmediate();
34
37 void GetBoundingVolume(plBoundingBoxSphere& ref_volume) const;
38
39 void UpdateWindSamples(plTime diff);
40
42 void ForceVisible();
43
44 plUInt64 GetNumActiveParticles() const;
45
48public:
50 void SetParameter(const plTempHashedString& sName, float value);
51
53 void SetParameter(const plTempHashedString& sName, const plColor& value);
54
56
57private:
58 friend class plParticleWorldModule;
59
61 plParticleEffectInstance* GetInstance() const;
62
63 const void* m_pSharedInstanceOwner = nullptr;
64 plParticleWorldModule* m_pModule = nullptr;
65 plParticleEffectHandle m_hEffect;
66};
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition ParticleEffectController.h:7
A handle to a particle effect.
Definition Declarations.h:39
Definition ParticleEffectInstance.h:25
This world module stores all particle effect data that is active in a given plWorld instance.
Definition ParticleWorldModule.h:24
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition HashedString.h:151
Definition RenderData.h:116
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12