noise: remove constexpr from most methods

temporary measure until debug macros can be made constexpr
This commit is contained in:
Danny Robson 2015-06-30 21:56:30 +10:00
parent 1211ee0876
commit 9bfdfa3f12
18 changed files with 30 additions and 30 deletions

View File

@ -27,7 +27,7 @@ namespace util { namespace noise { namespace basis {
using seed_t = uint64_t;
constant (seed_t);
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
seed_t seed;
T value;

View File

@ -21,7 +21,7 @@
namespace util { namespace noise { namespace basis {
template <typename T>
constexpr T
T
constant<T>::operator() (util::point<2,T>) const
{
return value;

View File

@ -29,13 +29,13 @@ namespace util { namespace noise { namespace basis {
perlin (seed_t);
range<T> bounds (void) const;
constexpr T operator() (point<2,T>) const;
T operator() (point<2,T>) const;
constexpr seed_t seed (void) const;
seed_t seed (void) const;
seed_t seed (seed_t);
private:
constexpr vector<2,T> gradient (point<2,intmax_t>) const;
vector<2,T> gradient (point<2,intmax_t>) const;
seed_t m_seed;
};
} } }

View File

@ -43,7 +43,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, lerp_t<T> L>
constexpr seed_t
seed_t
perlin<T,L>::seed (void) const
{
return m_seed;
@ -61,7 +61,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, util::noise::lerp_t<T> L>
constexpr T
T
perlin<T,L>::operator() (util::point<2,T> p) const
{
// extract integer and fractional parts. be careful to always round down
@ -99,7 +99,7 @@ namespace util { namespace noise { namespace basis {
///////////////////////////////////////////////////////////////////////////
template <typename T, lerp_t<T> L>
constexpr vector<2,T>
vector<2,T>
perlin<T,L>::gradient (point<2,intmax_t> p) const
{
using util::hash::murmur2::mix;

View File

@ -29,13 +29,13 @@ namespace util { namespace noise { namespace basis {
value (seed_t);
range<T> bounds (void) const;
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
constexpr seed_t seed (void) const;
seed_t seed (void) const;
seed_t seed (seed_t);
private:
constexpr T generate (point<2,intmax_t>) const;
T generate (point<2,intmax_t>) const;
seed_t m_seed;
};

View File

@ -40,7 +40,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, lerp_t<T> L>
constexpr seed_t
seed_t
value<T,L>::seed (void) const
{
return m_seed;
@ -58,7 +58,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, util::noise::lerp_t<T> L>
constexpr T
T
value<T,L>::operator() (util::point<2,T> p) const
{
// extract integer and fractional parts. be careful to always round down
@ -92,7 +92,7 @@ namespace util { namespace noise { namespace basis {
///////////////////////////////////////////////////////////////////////////
// Generate a type from [-UNIT..UNIT]
template <typename T, lerp_t<T> L>
constexpr T
T
value<T,L>::generate (point<2,intmax_t> p) const
{
using util::hash::murmur2::mix;

View File

@ -28,13 +28,13 @@ namespace util { namespace noise { namespace basis {
worley (seed_t);
range<T> bounds (void) const;
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
constexpr seed_t seed (void) const;
seed_t seed (void) const;
seed_t seed (seed_t);
private:
constexpr point<2,T> generate (point<2,intmax_t>) const;
point<2,T> generate (point<2,intmax_t>) const;
seed_t m_seed;
};
} } }

View File

@ -43,7 +43,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, size_t F>
constexpr seed_t
seed_t
worley<T,F>::seed (void) const
{
return m_seed;
@ -61,7 +61,7 @@ namespace util { namespace noise { namespace basis {
//-------------------------------------------------------------------------
template <typename T, size_t F>
constexpr T
T
worley<T,F>::operator() (util::point<2,T> p) const
{
// extract integer and fractional parts. be careful to always round down
@ -101,7 +101,7 @@ namespace util { namespace noise { namespace basis {
//////////////////////////////////////////////////////////////////////////
template <typename T, size_t F>
constexpr point<2,T>
point<2,T>
worley<T,F>::generate (point<2,intmax_t> p) const
{
using util::hash::murmur2::mix;

View File

@ -58,7 +58,7 @@ namespace util { namespace noise { namespace fractal {
constexpr T lacunarity (void) const;
T lacunarity (T);
constexpr seed_t seed (void) const;
seed_t seed (void) const;
seed_t seed (seed_t);
const B& basis (void) const;

View File

@ -136,7 +136,7 @@ namespace util { namespace noise { namespace fractal {
//-------------------------------------------------------------------------
template <typename T, typename B>
constexpr typename base<T,B>::seed_t
typename base<T,B>::seed_t
base<T,B>::seed (void) const
{
return m_basis.seed ();

View File

@ -53,7 +53,7 @@ namespace util { namespace noise { namespace fractal {
T gain);
fbm (seed_t);
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
};
} } }

View File

@ -56,7 +56,7 @@ namespace util { namespace noise { namespace fractal {
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
constexpr T
T
fbm<T,B>::operator() (util::point<2,T> p) const
{
T total = 0;

View File

@ -48,7 +48,7 @@ namespace util { namespace noise { namespace fractal {
hetero (seed_t);
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
private:
T m_offset;

View File

@ -57,7 +57,7 @@ namespace util { namespace noise { namespace fractal {
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
constexpr T
T
hetero<T,B>::operator() (util::point<2,T> p) const
{
T scale = this->m_invAH;

View File

@ -48,7 +48,7 @@ namespace util { namespace noise { namespace fractal {
hmf (seed_t);
constexpr T operator() (point<2,T>) const;
T operator() (point<2,T>) const;
private:
T m_offset;

View File

@ -58,7 +58,7 @@ namespace util { namespace noise { namespace fractal {
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
constexpr T
T
hmf<T,B>::operator() (util::point<2,T> p) const
{
T scale = this->m_invAH;

View File

@ -55,7 +55,7 @@ namespace util { namespace noise { namespace fractal {
rmf (seed_t);
constexpr T operator() (util::point<2,T>) const;
T operator() (util::point<2,T>) const;
private:
T m_offset;

View File

@ -60,7 +60,7 @@ namespace util { namespace noise { namespace fractal {
// we use the name 'amplitude' instead of musgrave's 'gain'.
// assumes basis distribution [-1,1] and offset ~= 1
template <typename T, typename B>
constexpr T
T
rmf<T,B>::operator() (util::point<2,T> p) const
{
T scale = this->m_invAH;