Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2021-07-23 15:31:40 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-07-23 15:31:40 +0300
commitde2c4ee58782a26f0e2dcac47d54bceb67a137e2 (patch)
tree796377b10fdd119fd8bd0261a8710b2285cb8680 /source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
parentf23b14091f60ccb23659075885d29bd24cd97f9d (diff)
Another slight increase in speed for Delaunay CDT.
When the new "need_ids" flag is false and the output type is not one of the valid BMesh kinds, there is no need to propagate even a dummy id to all of the faces.
Diffstat (limited to 'source/blender/blenlib/tests/BLI_delaunay_2d_test.cc')
-rw-r--r--source/blender/blenlib/tests/BLI_delaunay_2d_test.cc51
1 files changed, 51 insertions, 0 deletions
diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
index f158a5bbae9..f221036419e 100644
--- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
@@ -1948,6 +1948,12 @@ void text_test(
if (num_lines > 1) {
label += " lines=" + std::to_string(num_lines);
}
+ if (!need_ids) {
+ label += " no_ids";
+ }
+ if (otype != CDT_INSIDE_WITH_HOLES) {
+ label += " otype=" + std::to_string(otype);
+ }
graph_draw<T>(label, out.vert, out.edge, out.face);
}
}
@@ -1957,6 +1963,51 @@ TEST(delaunay_d, TextB10)
text_test<double>(10, 1, 1, CDT_INSIDE_WITH_HOLES, true);
}
+TEST(delaunay_d, TextB10_noids)
+{
+ text_test<double>(10, 1, 1, CDT_INSIDE_WITH_HOLES, false);
+}
+
+TEST(delaunay_d, TextB10_inside)
+{
+ text_test<double>(10, 1, 1, CDT_INSIDE, true);
+}
+
+TEST(delaunay_d, TextB10_inside_noids)
+{
+ text_test<double>(10, 1, 1, CDT_INSIDE, false);
+}
+
+TEST(delaunay_d, TextB10_constraints)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS, true);
+}
+
+TEST(delaunay_d, TextB10_constraints_noids)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS, false);
+}
+
+TEST(delaunay_d, TextB10_constraints_valid_bmesh)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS_VALID_BMESH, true);
+}
+
+TEST(delaunay_d, TextB10_constraints_valid_bmesh_noids)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS_VALID_BMESH, false);
+}
+
+TEST(delaunay_d, TextB10_constraints_valid_bmesh_with_holes)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES, true);
+}
+
+TEST(delaunay_d, TextB10_constraints_valid_bmesh_with_holes_noids)
+{
+ text_test<double>(10, 1, 1, CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES, false);
+}
+
TEST(delaunay_d, TextB200)
{
text_test<double>(200, 1, 1, CDT_INSIDE_WITH_HOLES, true);