Files
yoan stamant 722ecdcae0 [Smart object] Space partition structure is now configurable
* Created Default SmartObjectOctree
* Created Default SmartObjectHashGrid
* Type of space partition to use can be set in the smartobject config file: [/Script/SmartObjectsModule.SmartObjectSubsystem] SpacePartitionClassName=<ClassPath>
* Created DebugSceneProxy and RenderingComponent to share functionalities between susbystem and testing actor rendering components
#rnx
#rb mieszko.zielinski
#preflight 620fb51dec6f84cdfa3b2772

#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19050433 via CL 19050556 via CL 19050564 via CL 19057424
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066037 by yoan stamant in ue5-main branch]
2022-02-21 01:10:34 -05:00

29 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SmartObjectDebugSceneProxy.h"
#include "PrimitiveViewRelevance.h"
#if UE_ENABLE_DEBUG_DRAWING
FSmartObjectDebugSceneProxy::FSmartObjectDebugSceneProxy(const UPrimitiveComponent& InComponent, const EDrawType InDrawType, const TCHAR* InViewFlagName)
: FDebugRenderSceneProxy(&InComponent)
{
DrawType = InDrawType;
ViewFlagName = InViewFlagName;
ViewFlagIndex = uint32(FEngineShowFlags::FindIndexByName(*ViewFlagName));
}
FPrimitiveViewRelevance FSmartObjectDebugSceneProxy::GetViewRelevance(const FSceneView* View) const
{
FPrimitiveViewRelevance Result;
Result.bDrawRelevance = IsShown(View) && (ViewFlagIndex == INDEX_NONE || View->Family->EngineShowFlags.GetSingleFlag(ViewFlagIndex));
Result.bDynamicRelevance = true;
Result.bSeparateTranslucency = Result.bNormalTranslucency = true;
return Result;
}
uint32 FSmartObjectDebugSceneProxy::GetMemoryFootprint(void) const
{
return sizeof(*this) + FDebugRenderSceneProxy::GetAllocatedSize();
}
#endif // UE_ENABLE_DEBUG_DRAWING