| @@ -4,7 +4,6 @@ | |||||
| src/lol/base/types.h (vec_t shortcuts eg. vec2, ivec2, u8vec3 etc.) | src/lol/base/types.h (vec_t shortcuts eg. vec2, ivec2, u8vec3 etc.) | ||||
| src/lol/math/constants.h | src/lol/math/constants.h | ||||
| src/lol/math/functions.h | src/lol/math/functions.h | ||||
| src/lol/math/noise/* | |||||
| ## headers we could clean up and keep | ## headers we could clean up and keep | ||||
| @@ -0,0 +1,22 @@ | |||||
| // | |||||
| // Lol Engine | |||||
| // | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | |||||
| // Lol Engine is free software. It comes without any warranty, to | |||||
| // the extent permitted by applicable law. You can redistribute it | |||||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||||
| // See http://www.wtfpl.net/ for more details. | |||||
| // | |||||
| #pragma once | |||||
| // | |||||
| // Noise functions | |||||
| // ——————————————— | |||||
| // | |||||
| #include "private/perlin.h" | |||||
| #include "private/simplex.h" | |||||
| @@ -14,7 +14,9 @@ | |||||
| #pragma once | #pragma once | ||||
| #include <../legacy/lol/math/noise/gradient.h> | |||||
| #include "gradient.h" | |||||
| #include <cmath> // std::sqrt | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -36,6 +38,8 @@ public: | |||||
| /* Evaluate noise at a given point */ | /* Evaluate noise at a given point */ | ||||
| inline float eval(vec_t<float, N> position) const | inline float eval(vec_t<float, N> position) const | ||||
| { | { | ||||
| using std::sqrt; | |||||
| /* Compute the containing hypercube origin */ | /* Compute the containing hypercube origin */ | ||||
| vec_t<int, N> origin; | vec_t<int, N> origin; | ||||
| for (int i = 0; i < N; ++i) | for (int i = 0; i < N; ++i) | ||||
| @@ -14,7 +14,8 @@ | |||||
| #pragma once | #pragma once | ||||
| #include <../legacy/lol/math/noise/gradient.h> | |||||
| #include "gradient.h" | |||||
| #include <lol/math/vector.h> // vec_t | #include <lol/math/vector.h> // vec_t | ||||
| #include <lol/math/transform.h> // mat_t | #include <lol/math/transform.h> // mat_t | ||||
| @@ -408,5 +409,5 @@ private: | |||||
| } | } | ||||
| }; | }; | ||||
| } | |||||
| } // namespace lol | |||||