Antkeeper  0.0.1
Namespaces | Functions
voronoi.hpp File Reference
#include <engine/math/vector.hpp>
#include <engine/math/hash/make-uint.hpp>
#include <engine/math/hash/pcg.hpp>
#include <algorithm>
#include <array>
#include <cmath>
#include <tuple>
#include <limits>
#include <utility>

Go to the source code of this file.

Namespaces

 math
 Mathematical functions and data types.
 
 math::noise
 Noise functions.
 
 math::noise::voronoi
 Voronoi functions.
 

Functions

template<class T , std::size_t N>
std::tuple< T, vector< T, N >, hash::make_uint_t< T >> math::noise::voronoi::f1 (const vector< T, N > &position, T randomness=T{1}, const vector< T, N > &tiling=vector< T, N >::zero(), vector< hash::make_uint_t< T >, N >(*hash)(const vector< T, N > &)=&hash::pcg< T, N >)
 Finds the Voronoi cell (F1) containing the input position. More...
 
template<class T , std::size_t N>
std::tuple< T, vector< T, N >, hash::make_uint_t< T >, T > math::noise::voronoi::f1_edge (const vector< T, N > &position, T randomness=T{1}, const vector< T, N > &tiling=vector< T, N >::zero(), vector< hash::make_uint_t< T >, N >(*hash)(const vector< T, N > &)=&hash::pcg< T, N >)
 Finds the Voronoi cell (F1) containing the input position, along with the distance to the nearest edge. More...
 
template<class T , std::size_t N>
std::tuple< T, vector< T, N >, hash::make_uint_t< T >, T, vector< T, N >, hash::make_uint_t< T >> math::noise::voronoi::f1_f2 (const vector< T, N > &position, T randomness=T{1}, const vector< T, N > &tiling=vector< T, N >::zero(), vector< hash::make_uint_t< T >, N >(*hash)(const vector< T, N > &)=&hash::pcg< T, N >)
 Finds the Voronoi cell (F1) containing the input position, as well as the nearest neighboring cell (F2). More...