1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsCorePrerequisites.h" |
6 | #include "Math/BsMatrix4.h" |
7 | |
8 | namespace bs |
9 | { |
10 | struct EvaluatedAnimationData; |
11 | |
12 | /** @addtogroup Particles-Internal |
13 | * @{ |
14 | */ |
15 | |
16 | /** Contains particle system state that varies from frame to frame. */ |
17 | struct ParticleSystemState |
18 | { |
19 | float timeStart; |
20 | float timeEnd; |
21 | float nrmTimeStart; |
22 | float nrmTimeEnd; |
23 | float length; |
24 | float timeStep; |
25 | UINT32 maxParticles; |
26 | bool worldSpace; |
27 | bool gpuSimulated; |
28 | Matrix4 localToWorld; |
29 | Matrix4 worldToLocal; |
30 | ParticleSystem* system; |
31 | const SceneInstance* scene; |
32 | const EvaluatedAnimationData* animData; |
33 | }; |
34 | |
35 | /** Module that in some way modified or effects a ParticleSystem. */ |
36 | class BS_CORE_EXPORT ParticleModule : public IReflectable, INonCopyable |
37 | { |
38 | public: |
39 | ParticleModule(const ParticleModule&) = delete; |
40 | ParticleModule& operator=(const ParticleModule&) = delete; |
41 | |
42 | ParticleModule(ParticleModule&&) = delete; |
43 | ParticleModule& operator=(ParticleModule&&) = delete; |
44 | protected: |
45 | friend class ParticleSystem; |
46 | |
47 | ParticleModule() = default; |
48 | virtual ~ParticleModule() = default; |
49 | }; |
50 | |
51 | /** @} */ |
52 | } |