|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Namespace for random sampling utilities (a single, centralized home for RNG use). More...
Functions | |
| template<class T > | |
| std::vector< Vec3T< T > > | samplePoints (size_t a_count, uint64_t a_seed) |
| Sample a_count uniform random points in the unit cube [0,1]^3. | |
Namespace for random sampling utilities (a single, centralized home for RNG use).
|
inline |
Sample a_count uniform random points in the unit cube [0,1]^3.
Deterministic for a given seed: the same a_seed always produces the same points (a std::mt19937_64 seeded with a_seed drives a std::uniform_real_distribution over [0,1)), so callers get reproducible run-to-run results. The engine's output is fixed by the standard, but the distribution's is not, so the points are only guaranteed to match across builds that use the same standard library.
| T | Floating-point precision. |
| [in] | a_count | Number of points to sample. |
| [in] | a_seed | RNG seed. |