From 4beca1499ae02e1dafced55748e0763f6581f873 Mon Sep 17 00:00:00 2001 From: jehret <ehret@vr.rwth-aachen.de> Date: Tue, 11 Jul 2023 21:51:56 +0200 Subject: [PATCH] add more directivity methods --- .../Private/SoundSource/VAAbstractSourceComponent.cpp | 10 ++++++++++ .../Public/SoundSource/VAAbstractSourceComponent.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp b/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp index 181fdb8..a2c68f8 100644 --- a/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp +++ b/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp @@ -487,6 +487,16 @@ bool UVAAbstractSourceComponent::SetDirectivityByFileName(const FString FileName return SoundSource->SetDirectivity(CurrentReceiverActor->GetDirectivityByFileName(FileName)); } +bool UVAAbstractSourceComponent::SetDefaultDirectivity() +{ + return SoundSource->SetDirectivity(FVADirectivityManager::GetDefaultDirectivity()); +} + +bool UVAAbstractSourceComponent::SetNoDirectivity() +{ + return SoundSource->RemoveDirectivity(); +} + FString UVAAbstractSourceComponent::GetDirectivityFileName() const { if (SoundSource.IsValid()) diff --git a/Source/VAPlugin/Public/SoundSource/VAAbstractSourceComponent.h b/Source/VAPlugin/Public/SoundSource/VAAbstractSourceComponent.h index c2c95bd..4575805 100644 --- a/Source/VAPlugin/Public/SoundSource/VAAbstractSourceComponent.h +++ b/Source/VAPlugin/Public/SoundSource/VAAbstractSourceComponent.h @@ -156,6 +156,12 @@ public: // Sets Directivity by a File Name, Passing a empty string "" removes the directivity, passing "default" sets the default directivity UFUNCTION(BlueprintCallable) bool SetDirectivityByFileName(FString FileName); + + UFUNCTION(BlueprintCallable) + bool SetDefaultDirectivity(); + + UFUNCTION(BlueprintCallable) + bool SetNoDirectivity(); // Gets the File Name of the Directivity UFUNCTION(BlueprintCallable) -- GitLab