From 040e935b6d35407978f9ff5ad33b0b0c0249d0dd Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 15 Sep 2015 21:07:41 +1000 Subject: [PATCH] n/f/rmf: add offset accessor --- noise/fractal/rmf.hpp | 3 +++ noise/fractal/rmf.ipp | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/noise/fractal/rmf.hpp b/noise/fractal/rmf.hpp index 1ca98626..496ba92a 100644 --- a/noise/fractal/rmf.hpp +++ b/noise/fractal/rmf.hpp @@ -57,6 +57,9 @@ namespace util { namespace noise { namespace fractal { T operator() (util::point<2,T>) const; + T offset (void) const; + T offset (T); + private: T m_offset; }; diff --git a/noise/fractal/rmf.ipp b/noise/fractal/rmf.ipp index ee1890e4..99d24c8f 100644 --- a/noise/fractal/rmf.ipp +++ b/noise/fractal/rmf.ipp @@ -98,4 +98,22 @@ namespace util { namespace noise { namespace fractal { return result; } + + + /////////////////////////////////////////////////////////////////////////// + template + T + rmf::offset (void) const + { + return m_offset; + } + + + //------------------------------------------------------------------------- + template + T + rmf::offset (T _offset) + { + return m_offset = _offset; + } } } }