Files
UnrealEngineUWP/Engine/Source/Editor/ComponentVisualizers/Private/DecalComponentVisualizer.cpp
Martin Mittring 27cb0254a6 UE-8324 Default values for decal components are not suitable for a component workflow
added DecalSize to the decal component

[CL 2629028 by Martin Mittring in Main branch]
2015-07-22 12:03:24 -04:00

20 lines
768 B
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "ComponentVisualizersPrivatePCH.h"
#include "DecalComponentVisualizer.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->ComponentToWorld.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);
}
}