1
0

noise.h 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (c), Recep Aslantas.
  3. *
  4. * MIT License (MIT), http://opensource.org/licenses/MIT
  5. * Full license can be found in the LICENSE file
  6. */
  7. #ifndef cglms_noises_h
  8. #define cglms_noises_h
  9. #include "../common.h"
  10. #include "../types-struct.h"
  11. #include "../noise.h"
  12. #include "vec4.h"
  13. /*
  14. Functions:
  15. CGLM_INLINE float glms_perlin_vec4(vec4s point);
  16. */
  17. /*!
  18. * @brief Classic perlin noise
  19. *
  20. * @param[in] point 4D vector
  21. * @returns perlin noise value
  22. */
  23. CGLM_INLINE
  24. float
  25. glms_perlin_vec4(vec4s point) {
  26. return glm_perlin_vec4(point.raw);
  27. }
  28. /*!
  29. * @brief Classic perlin noise
  30. *
  31. * @param[in] point 3D vector
  32. * @returns perlin noise value
  33. */
  34. CGLM_INLINE
  35. float
  36. glms_perlin_vec3(vec3s point) {
  37. return glm_perlin_vec3(point.raw);
  38. }
  39. /*!
  40. * @brief Classic perlin noise
  41. *
  42. * @param[in] point 2D vector
  43. * @returns perlin noise value
  44. */
  45. CGLM_INLINE
  46. float
  47. glms_perlin_vec2(vec2s point) {
  48. return glm_perlin_vec2(point.raw);
  49. }
  50. #endif /* cglms_noises_h */