diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/freestyle/intern/geometry/Noise.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/freestyle/intern/geometry/Noise.h')
-rw-r--r-- | source/blender/freestyle/intern/geometry/Noise.h | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/source/blender/freestyle/intern/geometry/Noise.h b/source/blender/freestyle/intern/geometry/Noise.h index 6787e098306..18992092b19 100644 --- a/source/blender/freestyle/intern/geometry/Noise.h +++ b/source/blender/freestyle/intern/geometry/Noise.h @@ -27,7 +27,7 @@ #include "../system/FreestyleConfig.h" #ifdef WITH_CXX_GUARDEDALLOC -#include "MEM_guardedalloc.h" +# include "MEM_guardedalloc.h" #endif using namespace std; @@ -39,46 +39,47 @@ namespace Freestyle { using namespace Geometry; /*! Class to provide Perlin Noise functionalities */ -class Noise -{ -public: - /*! Builds a Noise object */ - Noise(long seed = -1); +class Noise { + public: + /*! Builds a Noise object */ + Noise(long seed = -1); - /*! Destructor */ - ~Noise() {} + /*! Destructor */ + ~Noise() + { + } - /*! Returns a noise value for a 1D element */ - float turbulence1(float arg, float freq, float amp, unsigned oct = 4); + /*! Returns a noise value for a 1D element */ + float turbulence1(float arg, float freq, float amp, unsigned oct = 4); - /*! Returns a noise value for a 2D element */ - float turbulence2(Vec2f& v, float freq, float amp, unsigned oct = 4); + /*! Returns a noise value for a 2D element */ + float turbulence2(Vec2f &v, float freq, float amp, unsigned oct = 4); - /*! Returns a noise value for a 3D element */ - float turbulence3(Vec3f& v, float freq, float amp, unsigned oct = 4); + /*! Returns a noise value for a 3D element */ + float turbulence3(Vec3f &v, float freq, float amp, unsigned oct = 4); - /*! Returns a smooth noise value for a 1D element */ - float smoothNoise1(float arg); + /*! Returns a smooth noise value for a 1D element */ + float smoothNoise1(float arg); - /*! Returns a smooth noise value for a 2D element */ - float smoothNoise2(Vec2f& vec); + /*! Returns a smooth noise value for a 2D element */ + float smoothNoise2(Vec2f &vec); - /*! Returns a smooth noise value for a 3D element */ - float smoothNoise3(Vec3f& vec); + /*! Returns a smooth noise value for a 3D element */ + float smoothNoise3(Vec3f &vec); -private: - int p[_NOISE_B + _NOISE_B + 2]; - float g3[_NOISE_B + _NOISE_B + 2][3]; - float g2[_NOISE_B + _NOISE_B + 2][2]; - float g1[_NOISE_B + _NOISE_B + 2]; - /* UNUSED */ - // int start; + private: + int p[_NOISE_B + _NOISE_B + 2]; + float g3[_NOISE_B + _NOISE_B + 2][3]; + float g2[_NOISE_B + _NOISE_B + 2][2]; + float g1[_NOISE_B + _NOISE_B + 2]; + /* UNUSED */ + // int start; #ifdef WITH_CXX_GUARDEDALLOC - MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Noise") + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Noise") #endif }; } /* namespace Freestyle */ -#endif // __NOISE_H__ +#endif // __NOISE_H__ |