2023-05-15 09:23:13 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
2023-07-24 11:29:58 -04:00
|
|
|
#include "LocalFogVolumeComponentVisualizer.h"
|
2023-05-15 09:23:13 -04:00
|
|
|
|
|
|
|
|
#include "Components/ActorComponent.h"
|
2023-07-24 11:29:58 -04:00
|
|
|
#include "Components/LocalFogVolumeComponent.h"
|
2023-05-15 12:51:10 -04:00
|
|
|
#include "SceneView.h"
|
|
|
|
|
#include "SceneManagement.h"
|
2023-05-15 09:23:13 -04:00
|
|
|
|
2023-07-24 12:00:44 -04:00
|
|
|
void FLocalFogVolumeComponentVisualizer::DrawVisualization( const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI )
|
2023-05-15 09:23:13 -04:00
|
|
|
{
|
|
|
|
|
if(View->Family->EngineShowFlags.CompositeEditorPrimitives)
|
|
|
|
|
{
|
2023-07-24 12:00:44 -04:00
|
|
|
const ULocalFogVolumeComponent* LocalFogVolume = Cast<const ULocalFogVolumeComponent>(Component);
|
|
|
|
|
if(LocalFogVolume != NULL)
|
2023-05-15 09:23:13 -04:00
|
|
|
{
|
2023-07-24 12:00:44 -04:00
|
|
|
FTransform LocalFogVolumeTransform = LocalFogVolume->GetComponentTransform();
|
2023-05-15 09:23:13 -04:00
|
|
|
|
2023-09-28 07:07:26 -04:00
|
|
|
const float MaximumAxisScale = LocalFogVolumeTransform.GetMaximumAxisScale() * ULocalFogVolumeComponent::GetBaseVolumeSize();
|
2023-08-30 10:31:34 -04:00
|
|
|
LocalFogVolumeTransform.SetScale3D(FVector(MaximumAxisScale, MaximumAxisScale, MaximumAxisScale));
|
|
|
|
|
|
2023-05-15 09:23:13 -04:00
|
|
|
// Draw local fog volume spherical shape radius
|
2023-07-24 12:00:44 -04:00
|
|
|
DrawWireSphereAutoSides(PDI, LocalFogVolumeTransform, FColor(200, 255, 255), 1.0f, SDPG_World);
|
2023-05-15 09:23:13 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|