Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target_sources(CcpTrinityAudioAPI INTERFACE
include/IStretchAudio.h
include/ITr2AudEmitter.h
include/ITr2AudGeometry.h
include/ITr2BoxVolume.h
include/ITr2Audio.h
)

Expand Down
36 changes: 36 additions & 0 deletions include/ITr2BoxVolume.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright © 2026 CCP ehf.
//
// Description:
// An interface for placing a box volume in the world.

#pragma once

#ifndef ITr2BoxVolume_h_
#define ITr2BoxVolume_h_

BLUE_INTERFACE( ITr2BoxVolume ) :
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. The object can be placed again with SetTransform.
*/
virtual void Remove() = 0;
};

#endif