libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Attributes | List of all members
donut::audio::Listener Struct Reference

Current state of the sound listener, i.e. More...

#include <donut/audio/Listener.hpp>

Public Attributes

vec3 position {0.0f, 0.0f, 0.0f}
 Position of the listener in the sound stage. More...
 
vec3 velocity {0.0f, 0.0f, 0.0f}
 Linear velocity of the listener. More...
 
vec3 aimDirection {0.0f, 0.0f, -1.0f}
 The direction the listener is facing. More...
 
vec3 up {0.0f, 1.0f, 0.0f}
 The direction upwards from the listener. More...
 

Detailed Description

Current state of the sound listener, i.e.

the user perceiving the audio, within a SoundStage.

This information is used in the calculations for various 3D sound effect simulations such as distance attenuation, sound delay and the doppler effect.

Examples
example_game.cpp.

Member Data Documentation

◆ position

vec3 donut::audio::Listener::position {0.0f, 0.0f, 0.0f}

Position of the listener in the sound stage.

Used for distance attenuation and sound delay, if enabled.

◆ velocity

vec3 donut::audio::Listener::velocity {0.0f, 0.0f, 0.0f}

Linear velocity of the listener.

Used in doppler effect calculations.

◆ aimDirection

vec3 donut::audio::Listener::aimDirection {0.0f, 0.0f, -1.0f}

The direction the listener is facing.

Does not need to be normalized.

◆ up

vec3 donut::audio::Listener::up {0.0f, 1.0f, 0.0f}

The direction upwards from the listener.

Does not need to be normalized.


The documentation for this struct was generated from the following file: