class

FSoundPropagation

Module
Audio
Header
#include "Audio/SoundPropagation.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr floatkSearchDbPerMeterRoute cost per metre while searching, in dB. Only a tie-break between routes whose portals cost the same; the chosen route's real spreading is computed exactly afterwards. Default 0.1f.

Public functions

ReturnsNameDescription
voidBuild
voidClear
const std::vector<FSoundRoom>&GetRooms
const std::vector<FSoundPortal>&GetPortals
int32_tRoomAt-1 when the point is outside every room.
int32_tFindRoomById
const FSoundPortal*FindPortal
const FSoundPortal*FindCrossedPortalThe least lossy linking portal whose opening the straight segment passes through, or null.
boolFindRouteThe quietest-loss chain of portals between two rooms; false when none.
FSoundPathEvaluatephysics may be null — then only the portal graph answers.
FSoundPathEvaluateThe straight route traced against acoustic geometry (the scan hierarchy) instead of the physics scene.
FSoundPathEvaluateThe world's live graph and the geometry its sound is traced against: the acoustic geometry installed for it (FGeometricAcoustics) when there is one and audio.Acoustics is on, else its physics scene; the straight trace alone when the world runs no FSoundPropagationSystem.
FSoundPathEvaluate
voidMixPortalThe open/closed energy mix of one opening.
voidDrawDebugRooms as boxes, portals as their opening, and a line from every portal to the centres of the rooms it joins — under the Audio debug category.

Function details

Build

C++
void Build(World& world)

Clear

C++
void Clear()

GetRooms

C++
const std::vector<FSoundRoom>& GetRooms() const

GetPortals

C++
const std::vector<FSoundPortal>& GetPortals() const

RoomAt

C++
int32_t RoomAt(const Vec3& point) const

-1 when the point is outside every room.

FindRoomById

C++
int32_t FindRoomById(const std::string& roomId) const

FindPortal

C++
const FSoundPortal* FindPortal(EntityID entity) const

FindCrossedPortal

C++
const FSoundPortal* FindCrossedPortal(const Vec3& from, const Vec3& to) const

The least lossy linking portal whose opening the straight segment passes through, or null.

FindRoute

C++
bool FindRoute(int32_t fromRoom, const Vec3& from, int32_t toRoom, const Vec3& to, FSoundPath& outPath) const

The quietest-loss chain of portals between two rooms; false when none.

Evaluate

C++
FSoundPath Evaluate(const PhysicsWorld* physics, const Vec3& from, const Vec3& to, uint32_t layerMask) const

physics may be null — then only the portal graph answers.

Evaluate

C++
FSoundPath Evaluate(const IAcousticGeometry& geometry, const Vec3& from, const Vec3& to) const

The straight route traced against acoustic geometry (the scan hierarchy) instead of the physics scene.

Evaluate

C++
static FSoundPath Evaluate(World& world, const Vec3& from, const Vec3& to, uint32_t layerMask)

The world's live graph and the geometry its sound is traced against: the acoustic geometry installed for it (FGeometricAcoustics) when there is one and audio.Acoustics is on, else its physics scene; the straight trace alone when the world runs no FSoundPropagationSystem. The layer mask filters physics only — acoustic geometry carries its own layers.

Evaluate

C++
static FSoundPath Evaluate(World& world, const Vec3& from, const Vec3& to)

MixPortal

C++
static void MixPortal(float openFraction, float openDb, float openCutoffHz, float closedDb, float closedCutoffHz, float& outDb, float& outCutoffHz)

The open/closed energy mix of one opening.

DrawDebug

C++
void DrawDebug() const

Rooms as boxes, portals as their opening, and a line from every portal to the centres of the rooms it joins — under the Audio debug category.

Generated from Audio/SoundPropagation.h via audio.json · Oct 26, 2026Version 1.0.0