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
35{
41 int32 VisList = 0;
42
47 int32 WaitingData = 0;
53 int32 ConversionTask = 0;
54
65
71
78 int32 Overhead = 0;
79};
80
81USTRUCT()
82struct FI3DHConnectorDrawingStorage
83{
84 GENERATED_BODY()
85
86 UPROPERTY(Transient)
87 TMap<int32, AI3DHDrawing*> DrawingHandleToActor;
88};
89
90USTRUCT()
91struct FI3DHConnectorRenderStorage
92{
93 GENERATED_BODY()
94
95 FI3DHConnectorRenderStorage();
96 ~FI3DHConnectorRenderStorage();
97
98 UE_NONCOPYABLE(FI3DHConnectorRenderStorage)
99
101 UPROPERTY(Transient)
102 TMap<int32, AI3DHGeometry*> RootNodeIdToGeometryActor;
104
105 // Untracked UObject because Component is owned by GeometryActor which is under our control.
106 // ReSharper disable once CppUE4ProbableMemoryIssuesWithUObjectsInContainer
107 TMap<FI3DHPageInstanceHandle, UStaticMeshComponent*> PageInstHandleToMeshComponent;
108 TMap<FI3DHPageInstanceHandle, TUniquePtr<FAsyncTask<FI3DHPageToStaticMeshTask>>> PageInstHandleToConversionTaskInProgress;
109
111 TSet<FI3DHPageInstanceHandle> LastInViewPageInstanceHandles;
112
114 UPROPERTY(Transient)
115 TMap<class UBodySetup*, UStaticMeshComponent*> AsyncCookBodySetupToMeshComponent;
116
123 TLruCache<FI3DHPageInstanceHandle, UStaticMeshComponent*> NotInViewButKeptVisibleLRUCache{100000};
124
126 int32 TrianglesOnComponentsWithVisibility = 0;
127
130};
131
132template<>
133struct TStructOpsTypeTraits< FI3DHConnectorRenderStorage > : public TStructOpsTypeTraitsBase2< FI3DHConnectorRenderStorage >
134{
135 enum
136 {
137 //WithNetSerializer = true,
138 WithCopy = false
139 };
140};
This actor is the scene representation of drawings in the session.
Definition I3DHDrawing.h:47
Actor containing mesh components used to represent instant3Dhub geometry.
Definition I3DHGeometry.h:59
The instant3Dhub API owned by the instant3Dhub AI3DHConnector.
Definition I3DHConnectorAPI.h:1208
#define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
Macro for temporarily disabling experimental warnings.
Definition I3DHVersion.h:267
#define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
Macro for re-enabling experimental warnings after PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS.
Definition I3DHVersion.h:284
These stats attempt to capture a frame-by-frame accurate view of our rendering data pipeline (see AI3...
Definition I3DHConnectorStorage.h:35
int32 ConversionTask
ConversionTask is the number of pages for which an async conversion task is currently running.
Definition I3DHConnectorStorage.h:53
int32 MeshComponentCreated
MeshComponentCreated is the subset of the visibility list for which a mesh component has already been...
Definition I3DHConnectorStorage.h:70
int32 WaitingData
WaitingData is the subset of these pages which are waiting for the backend to download the page insta...
Definition I3DHConnectorStorage.h:47
int32 Overhead
Overhead is the number of pages in the ConversionTask and WaitingMeshComponentCreation stages,...
Definition I3DHConnectorStorage.h:78
int32 VisList
VisList is the number of pages in the visibility list reported by the remote culler.
Definition I3DHConnectorStorage.h:41
int32 WaitingMeshComponentCreation
WaitingMeshComponentCreation is the number of pages for which the async conversion task is done,...
Definition I3DHConnectorStorage.h:64