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;
48
57
63 int32 ConversionTask = 0;
64
75
81
85 int32 Empty = 0;
86
92 int32 Error = 0;
93
100 int32 Overhead = 0;
101
111};
112
113USTRUCT()
114struct FI3DHConnectorDrawingStorage
115{
116 GENERATED_BODY()
117
118 UPROPERTY(Transient)
119 TMap<int32, AI3DHDrawing*> DrawingHandleToActor;
120};
121
122USTRUCT()
123struct FI3DHConnectorRenderStorage
124{
125 GENERATED_BODY()
126
127 FI3DHConnectorRenderStorage();
128 ~FI3DHConnectorRenderStorage();
129
130 UE_NONCOPYABLE(FI3DHConnectorRenderStorage)
131
132 TSet<int32> DeletedRootNodeIds;
133
135 UPROPERTY(Transient)
136 TMap<int32, AI3DHGeometry*> RootNodeIdToGeometryActor;
138
139 // Untracked UObject because Component is owned by GeometryActor which is under our control.
140 // ReSharper disable once CppUE4ProbableMemoryIssuesWithUObjectsInContainer
141 TMap<FI3DHPageInstanceHandle, UStaticMeshComponent*> PageInstHandleToMeshComponent;
142 TMap<FI3DHPageInstanceHandle, TUniquePtr<FAsyncTask<FI3DHPageToStaticMeshTask>>> PageInstHandleToConversionTask;
143
144 TArray<FAsyncTask<FI3DHPageToStaticMeshTask>*> ConversionTasksInProgress;
145 TArray<FAsyncTask<FI3DHPageToStaticMeshTask>*> ConversionTasksCompleted;
146
148 TSet<FI3DHPageInstanceHandle> LastInViewPageInstanceHandles;
149
151 UPROPERTY(Transient)
152 TMap<class UBodySetup*, UStaticMeshComponent*> AsyncCookBodySetupToMeshComponent;
153
160 TLruCache<FI3DHPageInstanceHandle, UStaticMeshComponent*> NotInViewButKeptVisibleLRUCache{100000};
161
163 int32 TrianglesOnComponentsWithVisibility = 0;
164
167};
168
169template<>
170struct TStructOpsTypeTraits<FI3DHConnectorRenderStorage> : public TStructOpsTypeTraitsBase2<FI3DHConnectorRenderStorage>
171{
172 enum
173 {
174 // WithNetSerializer = true,
175 WithCopy = false
176 };
177};
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:80
The instant3Dhub API owned by the instant3Dhub AI3DHConnector.
Definition I3DHConnectorAPI.h:1194
#define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
Macro for temporarily disabling experimental warnings.
Definition I3DHVersion.h:251
#define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
Macro for re-enabling experimental warnings after PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS.
Definition I3DHVersion.h:268
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:63
int32 MeshComponentCreated
MeshComponentCreated is the subset of the visibility list for which a mesh component has already been...
Definition I3DHConnectorStorage.h:80
int32 WaitingConversionTask
WaitingConversionTask is the number of pages for which the page instance data has been downloaded,...
Definition I3DHConnectorStorage.h:56
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 WaitingConversionTask, ConversionTask and WaitingMeshComponent...
Definition I3DHConnectorStorage.h:100
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:74
int32 Error
Error is the number of pages that are not rendered because of errors, e.g.
Definition I3DHConnectorStorage.h:92
int32 Empty
Empty is the number of pages that do not contain visible geometry.
Definition I3DHConnectorStorage.h:85
float ConversionTaskBackpressure
Indicates how much backpressure is put on the conversion task system.
Definition I3DHConnectorStorage.h:110