KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_poisson_disk.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <cmath>
#include <geometry/poisson_disk.h>

Go to the source code of this file.

Functions

static double torDistSq (const VECTOR2D &a, const VECTOR2D &b)
 
 BOOST_AUTO_TEST_CASE (DegenerateInputs)
 
 BOOST_AUTO_TEST_CASE (SamplesInUnitSquare)
 
 BOOST_AUTO_TEST_CASE (ToroidalMinDistanceRespected)
 
 BOOST_AUTO_TEST_CASE (DeterministicForSeed)
 
 BOOST_AUTO_TEST_CASE (ReasonableDensity)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( DegenerateInputs )

Definition at line 45 of file test_poisson_disk.cpp.

References empty(), and POISSON_DISK::ToroidalUnitTile().

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( DeterministicForSeed )

Definition at line 80 of file test_poisson_disk.cpp.

References BOOST_CHECK_EQUAL(), and POISSON_DISK::ToroidalUnitTile().

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( ReasonableDensity )

Definition at line 105 of file test_poisson_disk.cpp.

References POISSON_DISK::ToroidalUnitTile().

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( SamplesInUnitSquare )

Definition at line 53 of file test_poisson_disk.cpp.

References POISSON_DISK::ToroidalUnitTile().

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( ToroidalMinDistanceRespected )

Definition at line 63 of file test_poisson_disk.cpp.

References torDistSq(), and POISSON_DISK::ToroidalUnitTile().

◆ torDistSq()

static double torDistSq ( const VECTOR2D & a,
const VECTOR2D & b )
static

Definition at line 30 of file test_poisson_disk.cpp.

References torDistSq().

Referenced by BOOST_AUTO_TEST_CASE(), torDistSq(), and POISSON_DISK::ToroidalUnitTile().