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