GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
Listener.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Ivar Härnqvist
2// SPDX-License-Identifier: MIT
3
4#ifndef GREM_AUDIO_LISTENER_HPP
5#define GREM_AUDIO_LISTENER_HPP
6
8
9#include <GREM/core/math.hpp>
10
11namespace grem::audio {
12
20struct Listener {
26 vec3 position{0.0f, 0.0f, 0.0f};
27
33 vec3 velocity{0.0f, 0.0f, 0.0f};
34
40 vec3 forward{0.0f, 0.0f, -1.0f};
41
47 vec3 up{0.0f, 1.0f, 0.0f};
48};
49
50} // namespace grem::audio
51
52#endif
Definition Error.hpp:12
vec< 3, float > vec3
Definition math.hpp:439
Current state of the sound listener, i.e. the user perceiving the audio, within a SoundStage.
Definition Listener.hpp:20
vec3 forward
The direction the listener is facing.
Definition Listener.hpp:40
vec3 position
Position of the listener in the sound stage.
Definition Listener.hpp:26
vec3 up
The direction upwards from the listener.
Definition Listener.hpp:47
vec3 velocity
Linear velocity of the listener.
Definition Listener.hpp:33