Toast Engine
Loading...
Searching...
No Matches
audio_sphere_emitter.hpp
Go to the documentation of this file.
1
8#pragma once
10
11namespace toast {
12
19class TOAST_API [[ToastNode]] AudioSphereEmitter : public AudioEmitterBase {
20 friend class AudioEmitterBase;
21
22public:
23 void radius(float value);
24
25protected:
26 auto emitterPosition(const glm::vec3& listener) -> glm::vec3 override;
27
28 [[Reflect, Range(0.0, 100.0)]]
29 float m_radius = 2.0f;
30};
31
32}
Abstract base for all spatialized 3D audio emitters.
Sphere-shaped audio source.
Definition audio_sphere_emitter.hpp:19
auto emitterPosition(const glm::vec3 &listener) -> glm::vec3 override
override this to project listener to the shape's nearest surface
Definition audio_sphere_emitter.cpp:9
float m_radius
projection radius in world units
Definition audio_sphere_emitter.hpp:29
auto listener() noexcept -> event::Listener &
The event Listener owned by this node. Lazy-allocated, freed only with the node.
Definition node.cpp:204
Definition reflect.hpp:244