noise.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. default-domain:: C
  2. perlin
  3. ================================================================================
  4. Header: cglm/noise.h
  5. Classic Perlin noise implementation.
  6. Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
  7. https://github.com/stegu/webgl-noise
  8. Following Stefan Gustavson's paper "Simplex noise demystified":
  9. http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
  10. Implementation based on glm::perlin function:
  11. https://github.com/g-truc/glm/blob/master/glm/gtc/noise.inl
  12. Table of contents (click to go):
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. Functions:
  15. 1. :c:func:`glm_perlin_vec4`
  16. #. :c:func:`glm_perlin_vec3`
  17. #. :c:func:`glm_perlin_vec2`
  18. Functions documentation
  19. ~~~~~~~~~~~~~~~~~~~~~~~
  20. .. c:function:: float glm_perlin_vec4(vec4 point)
  21. | Classic Perlin noise
  22. Parameters:
  23. | *[in]* **point** 4D point
  24. Returns:
  25. | noise value
  26. .. c:function:: float glm_perlin_vec3(vec3 point)
  27. | Classic Perlin noise
  28. Parameters:
  29. | *[in]* **point** 3D point
  30. Returns:
  31. | noise value
  32. .. c:function:: float glm_perlin_vec2(vec2 point)
  33. | Classic Perlin noise
  34. Parameters:
  35. | *[in]* **point** 2D point
  36. Returns:
  37. | noise value