1 /// @ref gtc_noise 2 /// @file glm/gtc/noise.hpp 3 /// 4 /// @see core (dependence) 5 /// 6 /// @defgroup gtc_noise GLM_GTC_noise 7 /// @ingroup gtc 8 /// 9 /// Include <glm/gtc/noise.hpp> to use the features of this extension. 10 /// 11 /// Defines 2D, 3D and 4D procedural noise functions 12 /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 13 /// https://github.com/ashima/webgl-noise 14 /// Following Stefan Gustavson's paper "Simplex noise demystified": 15 /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf 16 17 #pragma once 18 19 // Dependencies 20 #include "../detail/setup.hpp" 21 #include "../detail/qualifier.hpp" 22 #include "../detail/_noise.hpp" 23 #include "../geometric.hpp" 24 #include "../common.hpp" 25 #include "../vector_relational.hpp" 26 #include "../vec2.hpp" 27 #include "../vec3.hpp" 28 #include "../vec4.hpp" 29 30 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 31 # pragma message("GLM: GLM_GTC_noise extension included") 32 #endif 33 34 namespace glm 35 { 36 /// @addtogroup gtc_noise 37 /// @{ 38 39 /// Classic perlin noise. 40 /// @see gtc_noise 41 template<length_t L, typename T, qualifier Q> 42 GLM_FUNC_DECL T perlin( 43 vec<L, T, Q> const& p); 44 45 /// Periodic perlin noise. 46 /// @see gtc_noise 47 template<length_t L, typename T, qualifier Q> 48 GLM_FUNC_DECL T perlin( 49 vec<L, T, Q> const& p, 50 vec<L, T, Q> const& rep); 51 52 /// Simplex noise. 53 /// @see gtc_noise 54 template<length_t L, typename T, qualifier Q> 55 GLM_FUNC_DECL T simplex( 56 vec<L, T, Q> const& p); 57 58 /// @} 59 }//namespace glm 60 61 #include "noise.inl" 62