n/f/base: add basis accessor

This commit is contained in:
Danny Robson 2015-06-11 19:32:35 +10:00
parent c3e3b79b2c
commit 5fbfa94dac
2 changed files with 21 additions and 0 deletions

View File

@ -61,6 +61,9 @@ namespace util { namespace noise { namespace fractal {
constexpr seed_t seed (void) const;
seed_t seed (seed_t);
const B& basis (void) const;
B& basis (void);
protected:
unsigned m_octaves;
T m_H;

View File

@ -141,4 +141,22 @@ namespace util { namespace noise { namespace fractal {
{
return m_basis.seed ();
}
//-------------------------------------------------------------------------
template <typename T, typename B>
const B&
base<T,B>::basis (void) const
{
return m_basis;
}
//-------------------------------------------------------------------------
template <typename T, typename B>
B&
base<T,B>::basis (void)
{
return m_basis;
}
} } }