Support calling pcg::fractal with geom::point
This commit is contained in:
parent
9be7fb87df
commit
6de32b1047
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <psemek/geom/vector.hpp>
|
||||
#include <psemek/geom/point.hpp>
|
||||
#include <psemek/util/assert.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -29,6 +30,11 @@ namespace psemek::pcg
|
|||
|
||||
value_type operator()(geom::vector<value_type, dimension> const & p) const;
|
||||
|
||||
value_type operator()(geom::point<value_type, dimension> const & p) const
|
||||
{
|
||||
return (*this)(p - p.zero());
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Generator> octaves;
|
||||
std::vector<float> weights;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue