Skip to content

Commit

Permalink
refactor: use native queue list in bw algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
andywiecko committed Jan 7, 2025
1 parent ea1a851 commit a418b17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Runtime/Triangulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ public void DynamicInsertPoint(OutputData<T2> output, int tId, T2 p, Allocator a
{
using var pathHalfedges = new NativeList<int>(allocator);
using var pathPoints = new NativeList<int>(allocator);
using var trianglesQueue = new NativeQueue<int>(allocator);
using var trianglesQueue = new NativeQueueList<int>(allocator);
using var visitedTriangles = new NativeList<bool>(allocator);

new RefineMeshStep.UnsafeBowerWatson
Expand All @@ -1486,7 +1486,7 @@ public void DynamicSplitHalfedge(OutputData<T2> output, int he, T alpha, Allocat
{
using var pathHalfedges = new NativeList<int>(allocator);
using var pathPoints = new NativeList<int>(allocator);
using var trianglesQueue = new NativeQueue<int>(allocator);
using var trianglesQueue = new NativeQueueList<int>(allocator);
using var visitedTriangles = new NativeList<bool>(allocator);

var triangles = output.Triangles;
Expand Down Expand Up @@ -3226,7 +3226,7 @@ public void Execute(Allocator allocator, bool refineMesh, bool constrainBoundary
}

using var _circles = circles = new(allocator) { Length = triangles.Length / 3 };
using var trianglesQueue = new NativeQueue<int>(allocator);
using var trianglesQueue = new NativeQueueList<int>(allocator);
using var pathPoints = new NativeList<int>(allocator);
using var pathHalfedges = new NativeList<int>(allocator);
using var visitedTriangles = new NativeList<bool>(triangles.Length / 3, allocator);
Expand Down Expand Up @@ -3487,7 +3487,7 @@ public struct UnsafeBowerWatson
public OutputData<T2> Output;
public NativeList<Circle> Circles;

public NativeQueue<int> TrianglesQueue;
public NativeQueueList<int> TrianglesQueue;
public NativeList<int> PathPoints;
public NativeList<int> PathHalfedges;
public NativeList<bool> VisitedTriangles;
Expand Down

0 comments on commit a418b17

Please sign in to comment.