Toast Engine
Loading...
Searching...
No Matches
audio_capsule_emitter.hpp
Go to the documentation of this file.
1
8#pragma once
10
11namespace toast {
12
19class TOAST_API [[ToastNode]] AudioCapsuleEmitter : public AudioEmitterBase {
20 friend class AudioEmitterBase;
21
22public:
23 void radius(float value);
24 void halfHeight(float value);
25
26protected:
27 auto emitterPosition(const glm::vec3& listener) -> glm::vec3 override;
28
29 [[Reflect, Range(0.0, 100.0)]]
30 float m_radius = 0.5f;
31
32 [[Reflect, Range(0.0, 100.0)]]
33 float m_half_height = 1.0f;
34};
35
36}
Abstract base for all spatialized 3D audio emitters.
Capsule-shaped audio source.
Definition audio_capsule_emitter.hpp:19
float m_half_height
half the capsule length along Y
Definition audio_capsule_emitter.hpp:33
auto emitterPosition(const glm::vec3 &listener) -> glm::vec3 override
override this to project listener to the shape's nearest surface
Definition audio_capsule_emitter.cpp:13
float m_radius
radius in world units
Definition audio_capsule_emitter.hpp:30
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