noise: remove constexpr from most methods
temporary measure until debug macros can be made constexpr
This commit is contained in:
parent
1211ee0876
commit
9bfdfa3f12
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
} } }
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
} } }
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 ();
|
||||
|
@ -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;
|
||||
};
|
||||
} } }
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user