Plasma Engine  2.0
Loading...
Searching...
No Matches
AudioSphereEnvironmentComponent.h
1#pragma once
2
3#include <AudioSystemPlugin/AudioSystemPluginDLL.h>
4
5#include <AudioSystemPlugin/Components/AudioSystemComponent.h>
6
9
12{
14
15 // plComponent
16
17public:
18 void Initialize() override;
19 void Deinitialize() override;
20 void SerializeComponent(plWorldWriter& stream) const override;
21 void DeserializeComponent(plWorldReader& stream) override;
22
23 // plAudioSystemComponent
24
25protected:
26 void plAudioSystemComponentIsAbstract() override {}
27
28 // plAudioSystemEnvironmentComponent
29
30public:
31 [[nodiscard]] float GetEnvironmentAmount(plAudioProxyComponent* pProxyComponent) const override;
32
33 // plAudioSphereEnvironmentComponent
34
35public:
37
41 [[nodiscard]] float GetRadius() const;
42
46 void SetRadius(float fRadius);
47
48protected:
49 void Update();
50
51private:
52 plBoundingSphere m_Sphere;
53};
Component that represent an audio entity in the scene graph.
Definition AudioProxyComponent.h:30
Component used to apply environment effects in a sphere shape.
Definition AudioSphereEnvironmentComponent.h:12
Base class for audio system component manager which need to update their states (eg....
Definition AudioSystemComponent.h:14
Base class for audio system environment components.
Definition AudioSystemComponent.h:67
virtual float GetEnvironmentAmount(plAudioProxyComponent *pProxyComponent) const =0
Gets the environment amount for the specified audio proxy component.
void Initialize() override
Can be overridden for basic initialization that depends on a valid hierarchy and position.
Definition AudioSystemComponent.cpp:46
void Deinitialize() override
This method is called before the component is destroyed. A derived type can override this method to d...
Definition AudioSystemComponent.cpp:84
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13