Commit 40a8f27c by Daniel Gotzen

more unittests

1 parent 00683495
Pipeline #4687 failed
in 1 minute 26 seconds
......@@ -16,7 +16,7 @@ void decimateHausdorff(ExampleMesh& mesh ){
HModHausdorff hModHausdorff; // use a hausdorff distance module
decimater.add(hModHausdorff); // register the hausdorff distance module
decimater.module(hModHausdorff).set_tolerance(10.0); // set max Hausdorff distance tollerance
decimater.module(hModHausdorff).set_tolerance(5.0); // set max Hausdorff distance tollerance
//note that ModHausdorff only supports binary mode and has to be used in combination with a non-binary module
HModNormalDeviation hModNormalDeviation; // use a non-binary module primarily
......
......@@ -14,15 +14,14 @@ void decimateQuadric(ExampleMesh& mesh ){
HModQuadric hModQuadric; // use a quadric module
decimater.add(hModQuadric); // register module at the decimater
std::cout << decimater.module(hModQuadric).name() << std::endl; // module access
/*
* since we need exactly one priority module (non-binary)
* we have to call set_binary(false) for our priority module
* in the case of HModQuadric, unset_max_err() calls set_binary(false) internally
* or sprcify binary mode calling set_max_err()
*/
decimater.module(hModQuadric).unset_max_err();
decimater.module(hModQuadric).set_max_err(2.0, false); // sets maximum quadratic error to 2 and binary mode to false
decimater.initialize();
decimater.decimate();
......
......@@ -15,14 +15,17 @@ void decimateRoundness(ExampleMesh& mesh ){
HModRoundness hModRoundness; // use a roundness module
decimater.add(hModRoundness); // register the roundness module
//in non-binary mode set OR unset minimal roundness
decimater.module(hModRoundness).set_min_roundness(0.5, false); // choose a minimal roundness value between 0 and 1.0 and set binary mode to false
decimater.module(hModRoundness).unset_min_roundness(); // or unset minimal roundness
//in binary mode choose a minimal roundness OR angle
decimater.module(hModRoundness).set_min_roundness(0.5, true); // choose a minimal roundness value between 0 and 1.0 and set binary mode to true
decimater.module(hModRoundness).set_min_roundness(0.7, true); // choose a minimal roundness value between 0 and 1.0 and set binary mode to true
decimater.module(hModRoundness).set_min_angle(15.0, true); // or choose a minimal angle in degrees. second argument gets ignored
//in non-binary mode set OR unset minimal roundness
decimater.module(hModRoundness).unset_min_roundness(); // unset minimal roundness
decimater.module(hModRoundness).set_min_roundness(0.7, false); // or choose a minimal roundness value between 0 and 1.0 and set binary mode to false
decimater.initialize();
decimater.decimate();
// after decimation: remove decimated elements from the mesh
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!