Files
UnrealEngineUWP/Engine/Source/Developer/FunctionalTesting/Private/FuncTestRenderingComponent.cpp
Josh Markiewicz b37f250b75 #Fort weekly dev->main using approved smoketest CL#2118999
UE4-Fortnite-CL-2118999
CL# 2118999
MCP CL# 2117450
Linux Dedicated Server
Backend: Testing

  "app" : "fortnite",
  "moduleName" : "Fortnite-PublicService",
  "branch" : "TRUNK",
  "build" : "217",
  "cln" : "2117450",
  "version" : "UNKNOWN"

[CL 2123380 by Josh Markiewicz in Main branch]
2014-07-01 11:28:39 -04:00

61 lines
1.9 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "FunctionalTestingPrivatePCH.h"
//#include "PrimitiveViewRelevance.h"
#include "PrimitiveSceneProxy.h"
//----------------------------------------------------------------------//
// FFTestRenderingSceneProxy
//----------------------------------------------------------------------//
class FFTestRenderingSceneProxy : public FPrimitiveSceneProxy
{
public:
/** Initialization constructor. */
FFTestRenderingSceneProxy(const UFuncTestRenderingComponent* InComponent)
: FPrimitiveSceneProxy(InComponent)
{
}
virtual void DrawDynamicElements(FPrimitiveDrawInterface* PDI,const FSceneView* View)
{
}
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View)
{
FPrimitiveViewRelevance Result;
Result.bDrawRelevance = IsShown(View) && IsSelected();
Result.bDynamicRelevance = true;
Result.bNormalTranslucencyRelevance = IsShown(View);
return Result;
}
virtual uint32 GetMemoryFootprint( void ) const { return( sizeof( *this ) + GetAllocatedSize() ); }
uint32 GetAllocatedSize( void ) const { return FPrimitiveSceneProxy::GetAllocatedSize(); }
protected:
AFunctionalTest* OwningTest;
};
//----------------------------------------------------------------------//
// UFuncTestRenderingComponent
//----------------------------------------------------------------------//
UFuncTestRenderingComponent::UFuncTestRenderingComponent(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
AlwaysLoadOnClient = false;
AlwaysLoadOnServer = false;
bSelectable = false;
}
FPrimitiveSceneProxy* UFuncTestRenderingComponent::CreateSceneProxy()
{
return new FFTestRenderingSceneProxy(this);
}
FBoxSphereBounds UFuncTestRenderingComponent::CalcBounds(const FTransform & LocalToWorld) const
{
FBox BoundingBox = GetOwner()->GetComponentsBoundingBox();
return FBoxSphereBounds(BoundingBox);
}