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
87 int32 Error = 0;
88
95 int32 Overhead = 0;
96
106};
107
108USTRUCT()
109struct FI3DHConnectorDrawingStorage
110{
111 GENERATED_BODY()
112
113 UPROPERTY(Transient)
114 TMap<int32, AI3DHDrawing*> DrawingHandleToActor;
115};
116
117USTRUCT()
118struct FI3DHConnectorRenderStorage
119{
120 GENERATED_BODY()
121
122 FI3DHConnectorRenderStorage();
123 ~FI3DHConnectorRenderStorage();
124
125 UE_NONCOPYABLE(FI3DHConnectorRenderStorage)
126
128 UPROPERTY(Transient)
129 TMap<int32, AI3DHGeometry*> RootNodeIdToGeometryActor;
131
132 // Untracked UObject because Component is owned by GeometryActor which is under our control.
133 // ReSharper disable once CppUE4ProbableMemoryIssuesWithUObjectsInContainer
134 TMap<FI3DHPageInstanceHandle, UStaticMeshComponent*> PageInstHandleToMeshComponent;
135 TMap<FI3DHPageInstanceHandle, TUniquePtr<FAsyncTask<FI3DHPageToStaticMeshTask>>> PageInstHandleToConversionTask;
136
137 TArray<FAsyncTask<FI3DHPageToStaticMeshTask>*> ConversionTasksInProgress;
138 TArray<FAsyncTask<FI3DHPageToStaticMeshTask>*> ConversionTasksCompleted;
139
141 TSet<FI3DHPageInstanceHandle> LastInViewPageInstanceHandles;
142
144 UPROPERTY(Transient)
145 TMap<class UBodySetup*, UStaticMeshComponent*> AsyncCookBodySetupToMeshComponent;
146
153 TLruCache<FI3DHPageInstanceHandle, UStaticMeshComponent*> NotInViewButKeptVisibleLRUCache{100000};
154
156 int32 TrianglesOnComponentsWithVisibility = 0;
157
160};
161
162template<>
163struct TStructOpsTypeTraits< FI3DHConnectorRenderStorage > : public TStructOpsTypeTraitsBase2< FI3DHConnectorRenderStorage >
164{
165 enum
166 {
167 //WithNetSerializer = true,
168 WithCopy = false
169 };
170};
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:1208
#define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
Macro for temporarily disabling experimental warnings.
Definition I3DHVersion.h:255
#define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
Macro for re-enabling experimental warnings after PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS.
Definition I3DHVersion.h:272
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:95
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:87
float ConversionTaskBackpressure
Indicates how much backpressure is put on the conversion task system.
Definition I3DHConnectorStorage.h:105