Skip to content

Commit 00159b7

Browse files
committed
Use HashSet instead of List for vertsToRemove
Allows for a great speed up in vertsToRemove.contains(...).
1 parent a3c27fb commit 00159b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/HoloToolkit/SpatialMapping/Scripts/SpatialProcessing/RemoveSurfaceVertices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private IEnumerator RemoveSurfaceVerticesWithinBoundsRoutine()
149149

150150
// Remove vertices from any mesh that intersects with the bounds.
151151
Vector3[] verts = mesh.vertices;
152-
List<int> vertsToRemove = new List<int>();
152+
HashSet<int> vertsToRemove = new HashSet<int>();
153153

154154
// Find which mesh vertices are within the bounds.
155155
for (int i = 0; i < verts.Length; ++i)

0 commit comments

Comments
 (0)