FGeometricAcousticsSystem
The scene's geometric acoustics. On its first tick it builds the acoustic geometry — its own scan hierarchy over the level when the ScanHierarchy plugin is loaded, else the physics scene — and installs the scan hierarchy for the world, which moves every occlusion query (world sources, proximity voice, radio, AI hearing) onto the scanned walls. Then, a few times a second, it re-traces the space around the listener: the decay and the absorption the walls really have go to the echo tail, and the exact early reflections replace its per-distance guess in the reverb impulse response.
- Module
- Game
- Header
#include "Gameplay/GeometricAcousticsSystem.h"- Namespace
Mowo
Echolocation: Echolocate sends a click out of a cone, reports the echoes, tells the AI a click was heard, and plays each returning echo from where it bounced once its round trip has elapsed (audio.Acoustics.EchoClip).
Constructors
| Signature | Name | Description |
|---|---|---|
FGeometricAcousticsSystem() | FGeometricAcousticsSystem | |
~FGeometricAcousticsSystem() override | ~FGeometricAcousticsSystem | |
FGeometricAcousticsSystem(const FGeometricAcousticsSystem&) = delete | FGeometricAcousticsSystem |
Public functions
| Returns | Name | Description |
|---|---|---|
FGeometricAcousticsSystem& | operator= | |
SystemPhase | GetPhase | |
const char* | GetDebugName | |
void | Initialize | |
void | Update | |
void | Shutdown | |
void | InvalidateGeometry | Drops the geometry so the next tick builds it again — after a level streamed in or the source setting changed. |
void | SetGeometry | Traces against geometry instead of building one, and installs it for the world's occlusion when forOcclusion. |
const IAcousticGeometry* | GetGeometry | |
bool | IsOcclusionInstalled | |
void | TraceListener | Re-traces the listener now instead of waiting for the next update slot. |
const FAcousticReverb& | GetReverb | |
const std::vector<FAcousticReflection>& | GetReflections | |
uint32_t | GetTraceCount | |
const FEcholocationResult& | Echolocate | |
const FEcholocationResult& | GetLastEcholocation | |
uint32_t | GetPendingEchoCount | |
uint32_t | GetReleasedEchoCount | |
FGeometricAcousticsSystem* | Find |
Function details
FGeometricAcousticsSystem
FGeometricAcousticsSystem()~FGeometricAcousticsSystem
~FGeometricAcousticsSystem() overrideFGeometricAcousticsSystem
FGeometricAcousticsSystem(const FGeometricAcousticsSystem&) = deleteoperator=
FGeometricAcousticsSystem& operator=(const FGeometricAcousticsSystem&) = deleteGetPhase
SystemPhase GetPhase() const overrideGetDebugName
const char* GetDebugName() const overrideInitialize
void Initialize(World* world) overrideUpdate
void Update(float deltaTime) overrideShutdown
void Shutdown() overrideInvalidateGeometry
void InvalidateGeometry()Drops the geometry so the next tick builds it again — after a level streamed in or the source setting changed.
SetGeometry
void SetGeometry(std::shared_ptr<IAcousticGeometry> geometry, bool forOcclusion)Traces against geometry instead of building one, and installs it for the world's occlusion when forOcclusion. Tools and tests.
GetGeometry
const IAcousticGeometry* GetGeometry() constIsOcclusionInstalled
bool IsOcclusionInstalled() constTraceListener
void TraceListener(const Vec3& listener)Re-traces the listener now instead of waiting for the next update slot.
GetReverb
const FAcousticReverb& GetReverb() constGetReflections
const std::vector<FAcousticReflection>& GetReflections() constGetTraceCount
uint32_t GetTraceCount() constEcholocate
const FEcholocationResult& Echolocate(const Vec3& origin, const Vec3& direction, EntityID instigator)GetLastEcholocation
const FEcholocationResult& GetLastEcholocation() constGetPendingEchoCount
uint32_t GetPendingEchoCount() constGetReleasedEchoCount
uint32_t GetReleasedEchoCount() constFind
static FGeometricAcousticsSystem* Find(World& world)