plumageRender/3rdparty/glm/gtc/noise.hpp

62 lines
1.5 KiB
C++
Raw Permalink Normal View History

2023-05-17 14:49:05 +08:00
/// @ref gtc_noise
/// @file glm/gtc/noise.hpp
///
/// @see core (dependence)
///
/// @defgroup gtc_noise GLM_GTC_noise
/// @ingroup gtc
///
2023-06-07 10:52:04 +08:00
/// Include <glm/gtc/noise.hpp> to use the features of this extension.
///
2025-02-15 20:55:58 +08:00
/// Defines 2D, 3D and 4D procedural noise functions
/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
/// https://github.com/ashima/webgl-noise
/// Following Stefan Gustavson's paper "Simplex noise demystified":
2023-05-17 14:49:05 +08:00
/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
#pragma once
// Dependencies
#include "../detail/setup.hpp"
2023-06-07 10:52:04 +08:00
#include "../detail/qualifier.hpp"
2023-05-17 14:49:05 +08:00
#include "../detail/_noise.hpp"
#include "../geometric.hpp"
#include "../common.hpp"
#include "../vector_relational.hpp"
#include "../vec2.hpp"
#include "../vec3.hpp"
#include "../vec4.hpp"
2025-02-15 20:55:58 +08:00
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
2023-05-17 14:49:05 +08:00
# pragma message("GLM: GLM_GTC_noise extension included")
#endif
namespace glm
{
/// @addtogroup gtc_noise
/// @{
/// Classic perlin noise.
/// @see gtc_noise
2023-06-07 10:52:04 +08:00
template<length_t L, typename T, qualifier Q>
2023-05-17 14:49:05 +08:00
GLM_FUNC_DECL T perlin(
2023-06-07 10:52:04 +08:00
vec<L, T, Q> const& p);
2025-02-15 20:55:58 +08:00
2023-05-17 14:49:05 +08:00
/// Periodic perlin noise.
/// @see gtc_noise
2023-06-07 10:52:04 +08:00
template<length_t L, typename T, qualifier Q>
2023-05-17 14:49:05 +08:00
GLM_FUNC_DECL T perlin(
2023-06-07 10:52:04 +08:00
vec<L, T, Q> const& p,
vec<L, T, Q> const& rep);
2023-05-17 14:49:05 +08:00
/// Simplex noise.
/// @see gtc_noise
2023-06-07 10:52:04 +08:00
template<length_t L, typename T, qualifier Q>
2023-05-17 14:49:05 +08:00
GLM_FUNC_DECL T simplex(
2023-06-07 10:52:04 +08:00
vec<L, T, Q> const& p);
2023-05-17 14:49:05 +08:00
/// @}
}//namespace glm
#include "noise.inl"