Files
UnrealEngineUWP/Engine/Source/Editor/ComponentVisualizers/Private/DecalComponentVisualizer.cpp
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

21 lines
789 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "DecalComponentVisualizer.h"
#include "SceneManagement.h"
#include "Components/DecalComponent.h"
void FDecalComponentVisualizer::DrawVisualization( const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI )
{
const UDecalComponent* DecalComponent = Cast<const UDecalComponent>(Component);
if(DecalComponent)
{
const FMatrix LocalToWorld = DecalComponent->GetComponentTransform().ToMatrixWithScale();
const FLinearColor DrawColor = FColor(0, 157, 0, 255);
DrawOrientedWireBox(PDI, LocalToWorld.GetOrigin(), LocalToWorld.GetScaledAxis( EAxis::X ), LocalToWorld.GetScaledAxis( EAxis::Y ), LocalToWorld.GetScaledAxis( EAxis::Z ), DecalComponent->DecalSize, DrawColor, SDPG_World);
}
}