From 78a796bad3e87d24cc1125f49ebe9312b6ceffac Mon Sep 17 00:00:00 2001 From: Phevos Rinis Date: Tue, 6 Oct 2026 12:07:13 +0000 Subject: [PATCH 1/3] create the ITr2VolumeObject interface to pass volume shapes from trinity to audio --- CMakeLists.txt | 1 + include/ITr2VolumeObject.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 include/ITr2VolumeObject.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a23783..8dc73c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ target_sources(CcpTrinityAudioAPI INTERFACE include/IStretchAudio.h include/ITr2AudEmitter.h include/ITr2AudGeometry.h + include/ITr2VolumeObject.h include/ITr2Audio.h ) diff --git a/include/ITr2VolumeObject.h b/include/ITr2VolumeObject.h new file mode 100644 index 0000000..a4ec619 --- /dev/null +++ b/include/ITr2VolumeObject.h @@ -0,0 +1,37 @@ +// Copyright © 2026 CCP ehf. +// +// Description: +// An interface for volume placement, audio will use that to wrap +// AK::SpatialAudio::SetRoom from the Wwise SDK + +#pragma once + +#ifndef ITr2VolumeObject_h_ +#define ITr2VolumeObject_h_ + +BLUE_INTERFACE( ITr2VolumeObject ) : + public IRoot +{ + /** + * @brief Places the unit box in the world. Creates the volume on the first call and updates it afterwards. + * + * @param unitBoxToWorld Maps the unit box [-0.5, 0.5]^3 to world space. Right-handed, metres, + * relative to the current floating origin. Scale encodes the box size. + */ + virtual void SetTransform( const Matrix& unitBoxToWorld ) = 0; + + /** + * @brief Enables or disables the volume without forgetting its placement. + * + * A volume starts enabled. Call this before the first SetTransform when the owner is disabled, + * so the volume is never briefly active. + */ + virtual void SetEnabled( bool enabled ) = 0; + + /** + * @brief Removes the volume from the audio engine. The object can be placed again with SetTransform. + */ + virtual void Remove() = 0; +}; + +#endif From 68b5ab065866f394155a6de384286983c40c3679 Mon Sep 17 00:00:00 2001 From: Phevos Rinis Date: Mon, 12 Oct 2026 09:42:21 +0000 Subject: [PATCH 2/3] rename ITr2VolumeObject to ITr2BoxVolume --- CMakeLists.txt | 2 +- include/{ITr2VolumeObject.h => ITr2BoxVolume.h} | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) rename include/{ITr2VolumeObject.h => ITr2BoxVolume.h} (70%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dc73c9..d9559b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ target_sources(CcpTrinityAudioAPI INTERFACE include/IStretchAudio.h include/ITr2AudEmitter.h include/ITr2AudGeometry.h - include/ITr2VolumeObject.h + include/ITr2BoxVolume.h include/ITr2Audio.h ) diff --git a/include/ITr2VolumeObject.h b/include/ITr2BoxVolume.h similarity index 70% rename from include/ITr2VolumeObject.h rename to include/ITr2BoxVolume.h index a4ec619..9876e56 100644 --- a/include/ITr2VolumeObject.h +++ b/include/ITr2BoxVolume.h @@ -1,15 +1,16 @@ // Copyright © 2026 CCP ehf. // // Description: -// An interface for volume placement, audio will use that to wrap -// AK::SpatialAudio::SetRoom from the Wwise SDK +// A box placed in world space. Unlike EveBoxVolume, which is a box +// in its owner's object space, the transform given here is already +// in world space. #pragma once -#ifndef ITr2VolumeObject_h_ -#define ITr2VolumeObject_h_ +#ifndef ITr2BoxVolume_h_ +#define ITr2BoxVolume_h_ -BLUE_INTERFACE( ITr2VolumeObject ) : +BLUE_INTERFACE( ITr2BoxVolume ) : public IRoot { /** @@ -29,7 +30,7 @@ BLUE_INTERFACE( ITr2VolumeObject ) : virtual void SetEnabled( bool enabled ) = 0; /** - * @brief Removes the volume from the audio engine. The object can be placed again with SetTransform. + * @brief Removes the volume. The object can be placed again with SetTransform. */ virtual void Remove() = 0; }; From 353f516f54549384a9aa09876975da41444c1b96 Mon Sep 17 00:00:00 2001 From: Phevos Rinis Date: Mon, 12 Oct 2026 09:57:23 +0000 Subject: [PATCH 3/3] simplify ITr2BoxVolume description --- include/ITr2BoxVolume.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/ITr2BoxVolume.h b/include/ITr2BoxVolume.h index 9876e56..7f4eef9 100644 --- a/include/ITr2BoxVolume.h +++ b/include/ITr2BoxVolume.h @@ -1,9 +1,7 @@ // Copyright © 2026 CCP ehf. // // Description: -// A box placed in world space. Unlike EveBoxVolume, which is a box -// in its owner's object space, the transform given here is already -// in world space. +// An interface for placing a box volume in the world. #pragma once