An audio-reactive boids simulation actor that uses a managed compute shader to simulate boid behavior based on audio input.
More...
#include <ST_C_VisAudioReactiveBoids.h>
|
| AST_C_VisAudioReactiveBoids () |
| AST_VisComputeBase () |
virtual void | Tick (float DeltaTime) override |
| AST_VisBase () |
virtual void | HandleBeginPlay () |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
virtual bool | RegisterToIO (EAudioIOType NewAudioIOType) |
bool | RegisterToIO (int32 NewAudioIOType) |
virtual void | DeregisterFromIO (EAudioIOType CurrAudioIOType) |
void | DeregisterFromIO (int32 CurrAudioIOType) |
void | OnAudioIOStatusChanged (bool bIsActive, FIntPoint IOId) |
| Event triggered when the status of an audio I/O device changes.
|
void | OnRawMagnitudesReady (const TArray< float > &RawMagnitudes, FIntPoint IOId) |
| Event triggered when raw magnitude data is ready for an audio I/O device.
|
void | OnFrequencyBandsReady (const TArray< float > &FrequencyBands, int32 NumFrequencyBands, FIntPoint IOId) |
| Event triggered when frequency band data is ready for an audio I/O device.
|
void | OnAmplitudesReady (const TArray< float > &Amplitudes, FIntPoint IOId) |
| Event triggered when amplitude data is ready for an audio I/O device.
|
void | OnPitchesReady (const TArray< float > &Pitches, FIntPoint IOId) |
| Event triggered when pitch data is ready for an audio I/O device.
|
void | OnBeatDetected (const TArray< float > &Beats, const TArray< bool > &BeatDetectedForChannel, FIntPoint IOId) |
| Event triggered when a beat is detected in the audio data for an I/O device.
|
|
static bool | IsPlaying (const UObject *WorldContextObject) |
An audio-reactive boids simulation actor that uses a managed compute shader to simulate boid behavior based on audio input.
◆ AST_C_VisAudioReactiveBoids()
AST_C_VisAudioReactiveBoids::AST_C_VisAudioReactiveBoids |
( |
| ) |
|
Sets default values for this actor's properties.
◆ BeginDestroy()
void AST_C_VisAudioReactiveBoids::BeginDestroy |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ BeginPlay()
void AST_C_VisAudioReactiveBoids::BeginPlay |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ DisposeComputeShader_GameThread()
void AST_C_VisAudioReactiveBoids::DisposeComputeShader_GameThread |
( |
| ) |
|
|
overrideprotectedvirtual |
Disposes of compute shader resources on the game thread.
Reimplemented from AST_VisComputeBase.
◆ DisposeComputeShader_RenderThread()
void AST_C_VisAudioReactiveBoids::DisposeComputeShader_RenderThread |
( |
FRHICommandListImmediate & | RHICmdList | ) |
|
|
overrideprotectedvirtual |
Disposes of compute shader resources on the render thread.
Reimplemented from AST_VisComputeBase.
◆ ExecuteComputeShader_GameThread()
void AST_C_VisAudioReactiveBoids::ExecuteComputeShader_GameThread |
( |
float | DeltaTime | ) |
|
|
overrideprotectedvirtual |
◆ ExecuteComputeShader_RenderThread()
void AST_C_VisAudioReactiveBoids::ExecuteComputeShader_RenderThread |
( |
FRHICommandListImmediate & | RHICmdList | ) |
|
|
overrideprotectedvirtual |
◆ GetNiagaraSystem()
TSoftObjectPtr< UNiagaraSystem > AST_C_VisAudioReactiveBoids::GetNiagaraSystem |
( |
| ) |
const |
|
protectedvirtual |
Returns the Niagara system asset used for the boids visualization.
- Returns
- A soft pointer to the Niagara system.
◆ GetOwnerName()
FString AST_C_VisAudioReactiveBoids::GetOwnerName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
Returns the owner's name for use in debugging or profiling.
- Returns
- The owner name as a string.
Reimplemented from AST_VisComputeBase.
◆ InitComputeShader_GameThread()
void AST_C_VisAudioReactiveBoids::InitComputeShader_GameThread |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ InitComputeShader_RenderThread()
void AST_C_VisAudioReactiveBoids::InitComputeShader_RenderThread |
( |
FRHICommandListImmediate & | RHICmdList | ) |
|
|
overrideprotectedvirtual |
Initializes the compute shader on the render thread.
Reimplemented from AST_VisComputeBase.
◆ OnAmplitudesReady_Implementation()
void AST_C_VisAudioReactiveBoids::OnAmplitudesReady_Implementation |
( |
const TArray< float > & | Amplitudes, |
|
|
FIntPoint | IOId ) |
|
overrideprotectedvirtual |
Called when amplitude data is ready from the audio IO.
- Parameters
-
Amplitudes | Array of amplitude values. |
IOId | The identifier of the audio IO. |
◆ OnAudioIOStatusChanged_Implementation()
void AST_C_VisAudioReactiveBoids::OnAudioIOStatusChanged_Implementation |
( |
bool | bIsActive, |
|
|
FIntPoint | IOId ) |
|
overrideprotectedvirtual |
Called when the audio IO system's status changes.
- Parameters
-
bIsActive | Whether the audio IO system is active. |
IOId | The identifier of the audio IO. |
◆ OnBeatDetected_Implementation()
void AST_C_VisAudioReactiveBoids::OnBeatDetected_Implementation |
( |
const TArray< float > & | Beats, |
|
|
const TArray< bool > & | BeatDetectedForChannel, |
|
|
FIntPoint | IOId ) |
|
overrideprotectedvirtual |
Called when beats are detected.
- Parameters
-
Beats | An array of detected beat values. |
BeatDetectedForChannel | An array of channels and if a beat was detected. |
IOId | The identifier of the I/O operation associated with the beats. |
◆ OnFrequencyBandsReady_Implementation()
void AST_C_VisAudioReactiveBoids::OnFrequencyBandsReady_Implementation |
( |
const TArray< float > & | FrequencyBands, |
|
|
int32 | NumFrequencyBands, |
|
|
FIntPoint | IOId ) |
|
overrideprotectedvirtual |
Called when frequency band data is ready from the audio IO.
- Parameters
-
FrequencyBands | Array of frequency band values. |
NumFrequencyBands | Number of bands available. |
IOId | The identifier of the audio IO. |
◆ OnPitchesReady_Implementation()
void AST_C_VisAudioReactiveBoids::OnPitchesReady_Implementation |
( |
const TArray< float > & | Pitches, |
|
|
FIntPoint | IOId ) |
|
overrideprotectedvirtual |
Called when pitch data is ready from the audio IO.
- Parameters
-
Pitches | Array of pitch values. |
IOId | The identifier of the audio IO. |
◆ SetConstantParameters()
bool AST_C_VisAudioReactiveBoids::SetConstantParameters |
( |
| ) |
|
|
overrideprotectedvirtual |
Sets constant (non-changing) parameters for the compute shader.
- Returns
- True if successful, false otherwise.
Reimplemented from AST_VisBase.
◆ SetDynamicParameters()
bool AST_C_VisAudioReactiveBoids::SetDynamicParameters |
( |
| ) |
|
|
overrideprotectedvirtual |
Sets dynamic (changing per-frame) parameters for the compute shader.
- Returns
- True if successful, false otherwise.
Reimplemented from AST_VisBase.
◆ BoidCurrentParameters
Current boid simulation parameters.
◆ BoidsArray
Array of boid items for simulation and visualization.
◆ BoidsPingPongBuffer
Ping-pong buffer for boid simulation data swapping between frames.
◆ BoidsRDGStateData
RDG state data used by the boids compute shader.
◆ MatiD
UMaterialInstanceDynamic* AST_C_VisAudioReactiveBoids::MatiD = nullptr |
|
protected |
Material Instance Dynamic for colouring the boids.
◆ Niagara
UNiagaraComponent* AST_C_VisAudioReactiveBoids::Niagara = nullptr |
|
protected |
Niagara component for rendering the boids.
◆ ReactiveBoidDynamicParameters
Dynamic parameters that react to audio input.
◆ ST_AudioIOBuffers_RT
Audio IO buffers stored on the render thread.
◆ ST_AudioIOData_GT
Audio IO data stored on the game thread.
The documentation for this class was generated from the following files:
- H:/Games/Unreal/Aaron/FunWithShaders/Plugins/ST_VJMaster/Source/ST_AudioVisualisation/Public/Compute/Vis/ST_C_VisAudioReactiveBoids.h
- H:/Games/Unreal/Aaron/FunWithShaders/Plugins/ST_VJMaster/Source/ST_AudioVisualisation/Private/Compute/Vis/ST_C_VisAudioReactiveBoids.cpp