From b477210e6261ebe75822b82737a6cd5fd89fb228 Mon Sep 17 00:00:00 2001 From: Alexander Scheurer Date: Tue, 4 Oct 2022 11:33:04 +0200 Subject: [PATCH] Added bool to determine pointcloud loading --- src/PointCloud/Potree/Potree2CloudDynamic.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PointCloud/Potree/Potree2CloudDynamic.cs b/src/PointCloud/Potree/Potree2CloudDynamic.cs index ae1aedc72b..4b73c8247a 100644 --- a/src/PointCloud/Potree/Potree2CloudDynamic.cs +++ b/src/PointCloud/Potree/Potree2CloudDynamic.cs @@ -105,6 +105,11 @@ public Potree2CloudDynamic(PointCloudDataHandlerBase dataHandler, IPointCl /// public Action NewMeshAction; + /// + /// Determins if new Meshes should be loaded. + /// + public bool LoadNewMeshes { get; set; } = true; + /// /// Uses the and to update the visible meshes. /// Called every frame. @@ -118,6 +123,9 @@ public void Update(float fov, int viewportHeight, FrustumF renderFrustum, float3 { DataHandler.ProcessDisposeQueue(); + if (!LoadNewMeshes) + return; + if (!_doUpdate && renderFrustum == VisibilityTester.RenderFrustum && viewportHeight == VisibilityTester.ViewportHeight && @@ -151,8 +159,6 @@ public void Update(float fov, int viewportHeight, FrustumF renderFrustum, float3 if (newMeshes.Any()) { - //Diagnostics.Debug($"New meshes {newMeshes.Count()}"); - foreach (var mesh in newMeshes) { NewMeshAction(mesh);