n/f/rmf: add offset accessor

This commit is contained in:
Danny Robson 2015-09-15 21:07:41 +10:00
parent 6c7c35d2dd
commit 040e935b6d
2 changed files with 21 additions and 0 deletions

View File

@ -57,6 +57,9 @@ namespace util { namespace noise { namespace fractal {
T operator() (util::point<2,T>) const; T operator() (util::point<2,T>) const;
T offset (void) const;
T offset (T);
private: private:
T m_offset; T m_offset;
}; };

View File

@ -98,4 +98,22 @@ namespace util { namespace noise { namespace fractal {
return result; return result;
} }
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
T
rmf<T,B>::offset (void) const
{
return m_offset;
}
//-------------------------------------------------------------------------
template <typename T, typename B>
T
rmf<T,B>::offset (T _offset)
{
return m_offset = _offset;
}
} } } } } }