n/f/base: add accessor implementations

This commit is contained in:
Danny Robson 2015-06-11 19:31:53 +10:00
parent c87d7d70b3
commit c3e3b79b2c

View File

@ -59,6 +59,15 @@ namespace util { namespace noise { namespace fractal {
} }
//-------------------------------------------------------------------------
template <typename T, typename B>
constexpr unsigned
base<T,B>::octaves (void) const
{
return m_octaves;
}
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
template <typename T, typename B> template <typename T, typename B>
T T
@ -67,7 +76,16 @@ namespace util { namespace noise { namespace fractal {
m_H = _h; m_H = _h;
m_invAH = std::pow (m_amplitude, -m_H); m_invAH = std::pow (m_amplitude, -m_H);
m_invGH = std::pow (m_gain, m_H); m_invGH = std::pow (m_gain, m_H);
return H; return m_H;
}
//-------------------------------------------------------------------------
template <typename T, typename B>
constexpr T
base<T,B>::H (void) const
{
return m_H;
} }
@ -98,6 +116,15 @@ namespace util { namespace noise { namespace fractal {
} }
//-------------------------------------------------------------------------
template <typename T, typename B>
constexpr T
base<T,B>::lacunarity (void) const
{
return m_lacunarity;
}
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
template <typename T, typename B> template <typename T, typename B>
typename base<T,B>::seed_t typename base<T,B>::seed_t
@ -105,4 +132,13 @@ namespace util { namespace noise { namespace fractal {
{ {
return m_basis.seed (_seed); return m_basis.seed (_seed);
} }
//-------------------------------------------------------------------------
template <typename T, typename B>
constexpr typename base<T,B>::seed_t
base<T,B>::seed (void) const
{
return m_basis.seed ();
}
} } } } } }