You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
77 lines
1.5 KiB
C++
77 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Array.h"
|
|
#include "DirectLinkCommon.h"
|
|
#include "DirectLinkParameterStore.h"
|
|
#include "UObject/NameTypes.h"
|
|
|
|
class FArchive;
|
|
|
|
namespace DirectLink
|
|
{
|
|
class IReferenceResolutionProvider;
|
|
class ISceneGraphNode;
|
|
|
|
|
|
enum class ESerializationStatus
|
|
{
|
|
Ok,
|
|
StreamError,
|
|
VersionMinNotRespected,
|
|
VersionMaxNotRespected,
|
|
};
|
|
|
|
|
|
struct DIRECTLINK_API FReferenceSnapshot
|
|
{
|
|
void Serialize(FArchive& Ar);
|
|
FElementHash Hash() const;
|
|
|
|
struct FReferenceGroup
|
|
{
|
|
FName Name;
|
|
TArray<FSceneGraphId> ReferencedIds;
|
|
};
|
|
|
|
TArray<FReferenceGroup> Groups;
|
|
};
|
|
|
|
|
|
|
|
class DIRECTLINK_API FElementSnapshot
|
|
{
|
|
public:
|
|
FElementSnapshot() = default;
|
|
FElementSnapshot(const ISceneGraphNode& Node);
|
|
|
|
friend FArchive& operator<<(FArchive& Ar, FElementSnapshot& This);
|
|
|
|
ESerializationStatus Serialize(FArchive& Ar);
|
|
|
|
FElementHash GetHash() const;
|
|
FElementHash GetDataHash() const; // #ue_directlink_sync: serialize hashs
|
|
FElementHash GetRefHash() const;
|
|
|
|
void UpdateNodeReferences(IReferenceResolutionProvider& Resolver, ISceneGraphNode& Node) const;
|
|
void UpdateNodeData(ISceneGraphNode& Node) const;
|
|
|
|
FSceneGraphId GetNodeId() const { return NodeId; }
|
|
|
|
template<typename T>
|
|
bool GetValueAs(FName Name, T& Out) const
|
|
{
|
|
return DataSnapshot.GetValueAs(Name, Out);
|
|
}
|
|
|
|
private:
|
|
FSceneGraphId NodeId;
|
|
mutable FElementHash DataHash = InvalidHash;
|
|
mutable FElementHash RefHash = InvalidHash;
|
|
FParameterStoreSnapshot DataSnapshot;
|
|
FReferenceSnapshot RefSnapshot;
|
|
};
|
|
|
|
} // namespace DirectLink
|