You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.8 KiB

  1. ///////////////////////////////////////////////////////////////////////////////////
  2. /// OpenGL Mathematics (glm.g-truc.net)
  3. ///
  4. /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
  5. /// Permission is hereby granted, free of charge, to any person obtaining a copy
  6. /// of this software and associated documentation files (the "Software"), to deal
  7. /// in the Software without restriction, including without limitation the rights
  8. /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. /// copies of the Software, and to permit persons to whom the Software is
  10. /// furnished to do so, subject to the following conditions:
  11. ///
  12. /// The above copyright notice and this permission notice shall be included in
  13. /// all copies or substantial portions of the Software.
  14. ///
  15. /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. /// THE SOFTWARE.
  22. ///
  23. /// @ref gtc_noise
  24. /// @file glm/gtc/noise.hpp
  25. /// @date 2011-04-21 / 2011-09-27
  26. /// @author Christophe Riccio
  27. ///
  28. /// @see core (dependence)
  29. ///
  30. /// @defgroup gtc_noise GLM_GTC_noise
  31. /// @ingroup gtc
  32. ///
  33. /// Defines 2D, 3D and 4D procedural noise functions
  34. /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
  35. /// https://github.com/ashima/webgl-noise
  36. /// Following Stefan Gustavson's paper "Simplex noise demystified":
  37. /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
  38. /// <glm/gtc/noise.hpp> need to be included to use these functionalities.
  39. ///////////////////////////////////////////////////////////////////////////////////
  40. #ifndef GLM_GTC_noise
  41. #define GLM_GTC_noise GLM_VERSION
  42. // Dependency:
  43. #include "../glm.hpp"
  44. #if(defined(GLM_MESSAGES) && !defined(glm_ext))
  45. # pragma message("GLM: GLM_GTC_noise extension included")
  46. #endif
  47. namespace glm
  48. {
  49. /// @addtogroup gtc_noise
  50. /// @{
  51. /// Classic perlin noise.
  52. /// @see gtc_noise
  53. template <typename T, template<typename> class vecType>
  54. T perlin(
  55. vecType<T> const & p);
  56. /// Periodic perlin noise.
  57. /// @see gtc_noise
  58. template <typename T, template<typename> class vecType>
  59. T perlin(
  60. vecType<T> const & p,
  61. vecType<T> const & rep);
  62. /// Simplex noise.
  63. /// @see gtc_noise
  64. template <typename T, template<typename> class vecType>
  65. T simplex(
  66. vecType<T> const & p);
  67. /// @}
  68. }//namespace glm
  69. #include "noise.inl"
  70. #endif//GLM_GTC_noise