Home | History | Annotate | Download | only in gtc
      1 ///////////////////////////////////////////////////////////////////////////////////
      2 /// OpenGL Mathematics (glm.g-truc.net)
      3 ///
      4 /// Copyright (c) 2005 - 2014 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 
     41 #ifndef GLM_GTC_noise
     42 #define GLM_GTC_noise
     43 
     44 // Dependencies
     45 #include "../detail/setup.hpp"
     46 #include "../detail/precision.hpp"
     47 
     48 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
     49 #	pragma message("GLM: GLM_GTC_noise extension included")
     50 #endif
     51 
     52 namespace glm
     53 {
     54 	/// @addtogroup gtc_noise
     55 	/// @{
     56 
     57 	/// Classic perlin noise.
     58 	/// @see gtc_noise
     59 	template <typename T, precision P, template<typename, precision> class vecType>
     60 	GLM_FUNC_DECL T perlin(
     61 		vecType<T, P> const & p);
     62 
     63 	/// Periodic perlin noise.
     64 	/// @see gtc_noise
     65 	template <typename T, precision P, template<typename, precision> class vecType>
     66 	GLM_FUNC_DECL T perlin(
     67 		vecType<T, P> const & p,
     68 		vecType<T, P> const & rep);
     69 
     70 	/// Simplex noise.
     71 	/// @see gtc_noise
     72 	template <typename T, precision P, template<typename, precision> class vecType>
     73 	GLM_FUNC_DECL T simplex(
     74 		vecType<T, P> const & p);
     75 
     76 	/// @}
     77 }//namespace glm
     78 
     79 #include "noise.inl"
     80 
     81 #endif//GLM_GTC_noise
     82