Antkeeper
0.0.1
|
Voronoi functions. More...
Functions | |
template<class T , std::size_t N> | |
std::tuple< T, vector< T, N >, hash::make_uint_t< T >> | 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 > | 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 >> | 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... | |
Voronoi functions.
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 >(*)(const vector< T, N > &) | hash = &hash::pcg<T, N> |
||
) |
Finds the Voronoi cell (F1) containing the input position.
T | Real type. |
N | Number of dimensions. |
position | Input position. |
randomness | Degree of randomness, on [0, 1] . |
tiling | Distance at which the Voronoi pattern should repeat. A value of 0 indicates no repetition. |
hash | Hash function. |
position
to the F1 cell, the displacement vector from the input position to the F1 cell center, and a hash value indicating the ID of the F1 cell. Definition at line 121 of file voronoi.hpp.
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 >(*)(const vector< T, N > &) | hash = &hash::pcg<T, N> |
||
) |
Finds the Voronoi cell (F1) containing the input position, along with the distance to the nearest edge.
T | Real type. |
N | Number of dimensions. |
position | Input position. |
randomness | Degree of randomness, on [0, 1] . |
tiling | Distance at which the Voronoi pattern should repeat. A value of 0 indicates no repetition. |
hash | Hash function. |
position
to the F1 cell center, the displacement vector from the input position to the F1 cell center, a hash value indicating the ID of the F1 cell, and the square Euclidean distance from position
to the nearest edge. Definition at line 214 of file voronoi.hpp.
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 >(*)(const vector< T, N > &) | hash = &hash::pcg<T, N> |
||
) |
Finds the Voronoi cell (F1) containing the input position, as well as the nearest neighboring cell (F2).
T | Real type. |
N | Number of dimensions. |
position | Input position. |
randomness | Degree of randomness, on [0, 1] . |
tiling | Distance at which the Voronoi pattern should repeat. A value of 0 indicates no repetition. |
hash | Hash function. |
Definition at line 343 of file voronoi.hpp.