From b97d026c26ecca04f0e4edde2a626ddb4d046d33 Mon Sep 17 00:00:00 2001 From: nzfeng Date: Sat, 24 Aug 2024 16:35:22 -0400 Subject: [PATCH] update the PoissonDiskSampler test --- test/src/poisson_disk_sampler_test.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/src/poisson_disk_sampler_test.cpp b/test/src/poisson_disk_sampler_test.cpp index 963f3a0d..9e2690c5 100644 --- a/test/src/poisson_disk_sampler_test.cpp +++ b/test/src/poisson_disk_sampler_test.cpp @@ -23,16 +23,8 @@ size_t sampleSquareDisk(double width, double sampling_distance) { std::unique_ptr geometry; std::tie(mesh, geometry) = makeManifoldSurfaceMeshAndGeometry(simpleMesh.polygons, simpleMesh.vertexCoordinates); - geometry->requireEdgeLengths(); - double meanEdgeLength = 0.; - for (auto e : mesh->edges()) { - meanEdgeLength += geometry->edgeLengths[e]; - } - meanEdgeLength /= mesh->nEdges(); - geometry->unrequireEdgeLengths(); - PoissonDiskOptions options; - options.rCoef = sampling_distance / meanEdgeLength; + options.r = sampling_distance; // make tests reproducible geometrycentral::util_mersenne_twister.seed(101);