I3DHConnectorStorage.h Source File

instant3Dhub: I3DHConnectorStorage.h Source File
instant3Dhub
I3DHConnectorStorage.h
Go to the documentation of this file.
1
6// @@TODO_Nico: This file can be placed in Private if we don't delete the header during build pipeline for UBT to work
7
8#pragma once
9
10#include "CoreMinimal.h"
11
12#include "I3DHDataTypes.h"
13
14#include "Containers/LruCache.h"
15#include "Templates/UniquePtr.h"
16
17#include "I3DHConnectorStorage.generated.h"
18
19// ----------------------------------------------------------
20// Forward declarations
21// ----------------------------------------------------------
23class AI3DHDrawing;
24class AI3DHGeometry;
25
26class FI3DHPageToStaticMeshTask; // Forward declaration
27template<typename T>
28class FAsyncTask; // Forward declaration
29
30USTRUCT()
31struct FI3DHConnectorDrawingStorage
32{
33 GENERATED_BODY()
34
35 UPROPERTY(Transient)
36 TMap<int32, AI3DHDrawing*> DrawingHandleToActor;
37
38 UPROPERTY(Transient)
39 TMap<FLinearColor, class UMaterialInterface*> DrawingMaterialCache;
40};
41
42USTRUCT()
43struct FI3DHConnectorRenderStorage
44{
45 GENERATED_BODY()
46
47 FI3DHConnectorRenderStorage();
48 ~FI3DHConnectorRenderStorage();
49
50 UE_NONCOPYABLE(FI3DHConnectorRenderStorage)
51
52 UPROPERTY(Transient)
53 TMap<int32, AI3DHGeometry*> RootNodeIdToGeometryActor;
54
55 // Untracked UObject because Component is owned by GeometryActor which is under our control.
56 // ReSharper disable once CppUE4ProbableMemoryIssuesWithUObjectsInContainer
57 TMap<FI3DHPageInstanceHandle, UStaticMeshComponent*> PageInstHandleToMeshComponent;
58 TMap<FI3DHPageInstanceHandle, TUniquePtr<FAsyncTask<FI3DHPageToStaticMeshTask>>> PageInstHandleToConversionTaskInProgress;
59
61 TSet<FI3DHPageInstanceHandle> LastInViewPageInstanceHandles;
62
64 UPROPERTY(Transient)
65 TMap<class UBodySetup*, UStaticMeshComponent*> AsyncCookBodySetupToMeshComponent;
66
73 TLruCache<FI3DHPageInstanceHandle, UStaticMeshComponent*> NotInViewButKeptVisibleLRUCache{100000};
74
76 int32 TrianglesOnComponentsWithVisibility = 0;
77};
78
79template<>
80struct TStructOpsTypeTraits< FI3DHConnectorRenderStorage > : public TStructOpsTypeTraitsBase2< FI3DHConnectorRenderStorage >
81{
82 enum
83 {
84 //WithNetSerializer = true,
85 WithCopy = false
86 };
87};
This actor is the scene representation of drawings in the session.
Definition I3DHDrawing.h:20
Actor containing mesh components used to represent instant3Dhub geometry.
Definition I3DHGeometry.h:59
The instant3Dhub API owned by the instant3Dhub AI3DHConnector.
Definition I3DHConnectorAPI.h:1139