From 5fbfa94dacf3da3e1f703f0cf9aefba9084a91bd Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 11 Jun 2015 19:32:35 +1000 Subject: [PATCH] n/f/base: add basis accessor --- noise/fractal/base.hpp | 3 +++ noise/fractal/base.ipp | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/noise/fractal/base.hpp b/noise/fractal/base.hpp index 6d8ae58d..be93413d 100644 --- a/noise/fractal/base.hpp +++ b/noise/fractal/base.hpp @@ -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; diff --git a/noise/fractal/base.ipp b/noise/fractal/base.ipp index 8918f71e..e51abf06 100644 --- a/noise/fractal/base.ipp +++ b/noise/fractal/base.ipp @@ -141,4 +141,22 @@ namespace util { namespace noise { namespace fractal { { return m_basis.seed (); } + + + //------------------------------------------------------------------------- + template + const B& + base::basis (void) const + { + return m_basis; + } + + + //------------------------------------------------------------------------- + template + B& + base::basis (void) + { + return m_basis; + } } } }