noise.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #pragma once
  17. // Dependencies
  18. #include "../detail/setup.hpp"
  19. #include "../detail/qualifier.hpp"
  20. #include "../detail/_noise.hpp"
  21. #include "../geometric.hpp"
  22. #include "../common.hpp"
  23. #include "../vector_relational.hpp"
  24. #include "../vec2.hpp"
  25. #include "../vec3.hpp"
  26. #include "../vec4.hpp"
  27. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  28. # pragma message("GLM: GLM_GTC_noise extension included")
  29. #endif
  30. namespace glm
  31. {
  32. /// @addtogroup gtc_noise
  33. /// @{
  34. /// Classic perlin noise.
  35. /// @see gtc_noise
  36. template<length_t L, typename T, qualifier Q>
  37. GLM_FUNC_DECL T perlin(
  38. vec<L, T, Q> const& p);
  39. /// Periodic 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. vec<L, T, Q> const& rep);
  45. /// Simplex noise.
  46. /// @see gtc_noise
  47. template<length_t L, typename T, qualifier Q>
  48. GLM_FUNC_DECL T simplex(
  49. vec<L, T, Q> const& p);
  50. /// @}
  51. }//namespace glm
  52. #include "noise.inl"