region: add uniform sampler
This commit is contained in:
parent
78dd62283b
commit
16fc2effb2
@ -209,6 +209,14 @@ namespace util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <size_t S, typename T, typename GeneratorT>
|
||||||
|
util::point<S,T>
|
||||||
|
sample (region<S,T> shape, GeneratorT &&gen)
|
||||||
|
{
|
||||||
|
return shape.p + sample (shape.e, std::forward<GeneratorT> (gen)).template as<util::vector> ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
template <typename T> using region2 = region<2,T>;
|
template <typename T> using region2 = region<2,T>;
|
||||||
template <typename T> using region3 = region<3,T>;
|
template <typename T> using region3 = region<3,T>;
|
||||||
|
Loading…
Reference in New Issue
Block a user