Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wanderlib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WANDER
Wanderlib
Commits
2033ff7a
Commit
2033ff7a
authored
2 years ago
by
Knuiman, Bart
Browse files
Options
Downloads
Patches
Plain Diff
Fixes
parent
2dbd0e56
Branches
main
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Runtime/Lidar/LAZLoader.cs
+3
-1
3 additions, 1 deletion
Runtime/Lidar/LAZLoader.cs
Runtime/Lidar/LAZOctreeCell.cs
+3
-2
3 additions, 2 deletions
Runtime/Lidar/LAZOctreeCell.cs
Runtime/Lidar/LAZOctreeCellData/LAZOctreeCellMesh.cs
+7
-7
7 additions, 7 deletions
Runtime/Lidar/LAZOctreeCellData/LAZOctreeCellMesh.cs
with
13 additions
and
10 deletions
Runtime/Lidar/LAZLoader.cs
+
3
−
1
View file @
2033ff7a
...
...
@@ -674,7 +674,7 @@ namespace LAZNamespace
#
endregion
#
region
Generic
Tasks
public
GenericTask
StartGenericTask
(
Action
callback
,
Action
onDone
=
null
)
public
GenericTask
StartGenericTask
(
Action
callback
,
Action
onDone
=
null
,
bool
executeOnMain
=
false
)
{
// Lazy initialize, if not already on main thread.
if
(
genericTasks
==
null
)
...
...
@@ -690,6 +690,8 @@ namespace LAZNamespace
gt
.
done
=
false
;
uint
taskIdx
=
(
uint
)
genericTaskIterator
++;
taskIdx
%=
(
uint
)
numGenericTasks
;
if
(
executeOnMain
)
taskIdx
=
0
;
// This allows ordered execution of tasks.
lock
(
genericTasks
[
taskIdx
])
{
genericTasks
[
taskIdx
].
Add
(
gt
);
...
...
This diff is collapsed.
Click to expand it.
Runtime/Lidar/LAZOctreeCell.cs
+
3
−
2
View file @
2033ff7a
...
...
@@ -495,7 +495,7 @@ namespace LAZNamespace
var
verticesSliced
=
vertices
;
if
(
verticesSliced
==
null
)
// Might be unloading the data.
return
;
System
.
Diagnostics
.
Debug
.
Assert
(
Directory
.
Exists
(
tree
.
PathToCacheFolder
)
);
Debug
.
Assert
(
Directory
.
Exists
(
tree
.
PathToCacheFolder
)
);
var
filePath
=
GetPathOnDisk
().
NormalizePath
();
Monitor
.
Enter
(
this
);
try
...
...
@@ -510,6 +510,7 @@ namespace LAZNamespace
{
verticesSliced
[
i
].
Write
(
br
);
}
br
.
Flush
();
}
}
finally
...
...
@@ -556,7 +557,7 @@ namespace LAZNamespace
verticesNew
.
Add
(
ver
);
}
numPoints
=
verticesNew
.
Count
;
System
.
Diagnostics
.
Debug
.
Assert
(
verticesNew
.
Count
==
vertCount
,
"Cache invalid. Clear cache and Reload files."
);
Debug
.
Assert
(
verticesNew
.
Count
==
vertCount
,
"Cache invalid. Clear cache and Reload files."
);
vertices
=
verticesNew
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Runtime/Lidar/LAZOctreeCellData/LAZOctreeCellMesh.cs
+
7
−
7
View file @
2033ff7a
...
...
@@ -59,13 +59,13 @@ namespace LAZNamespace
}
);
}
}
// Regardless of visible, we must finish the task, otherewise it will only due when visible, but task was already started.
if
(
loadVoxelTask
!=
null
&&
loadVoxelTask
.
done
)
{
loadVoxelTask
=
null
;
FinalizeMeshData
()
;
UnityEngine
.
Debug
.
Log
(
"done updating mesh"
);
}
}
// Regardless of visible, we must finish the task, otherewise it will only due when visible, but task was already started.
if
(
loadVoxelTask
!=
null
&&
loadVoxelTask
.
done
)
{
loadVoxelTask
=
null
;
FinalizeMeshData
(
);
UnityEngine
.
Debug
.
Log
(
"done updating mesh"
);
}
return
mesh
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment