// Copyright Epic Games, Inc. All Rights Reserved. #include "ChaosVDGTAccelerationStructuresDataComponent.h" #include "ChaosVDRecording.h" #include "Algo/Copy.h" #include UE_INLINE_GENERATED_CPP_BY_NAME(ChaosVDGTAccelerationStructuresDataComponent) UChaosVDGTAccelerationStructuresDataComponent::UChaosVDGTAccelerationStructuresDataComponent() { PrimaryComponentTick.bCanEverTick = false; SetCanEverAffectNavigation(false); bNavigationRelevant = false; } void UChaosVDGTAccelerationStructuresDataComponent::UpdateAABBTreeData(TConstArrayView> AABBTreeDataView) { RecordedABBTreeData.Reset(AABBTreeDataView.Num()); Algo::Copy(AABBTreeDataView, RecordedABBTreeData); } void UChaosVDGTAccelerationStructuresDataComponent::UpdateFromNewGameFrameData(const FChaosVDGameFrameData& InGameFrameData) { if (TSharedPtr AABBTreeDataContainer = InGameFrameData.GetCustomDataHandler().GetData()) { if (const TArray>* RecordedAABBTreesData = AABBTreeDataContainer->RecordedAABBTreesBySolverID.Find(SolverID)) { UpdateAABBTreeData(*RecordedAABBTreesData); } } } void UChaosVDGTAccelerationStructuresDataComponent::ClearData() { RecordedABBTreeData.Reset(); }