HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_MxNoise.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_MxNoise.h (UT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __UT_MxNoise__
12 #define __UT_MxNoise__
13 
14 #include "UT_API.h"
15 #include "UT_Vector2.h"
16 #include "UT_Vector3.h"
17 #include "UT_Vector4.h"
18 
19 // Noise functions that implement Perlin noise compatible with MaterialX
21 {
22 public:
23  template <bool TILED = false>
24  static float cellnoiseF(float P, uint period = 0);
25  template <bool TILED = false>
26  static float cellnoiseF(const UT_Vector2 &P,
27  uint period_x = 0, uint period_y = 0);
28  template <bool TILED = false>
29  static float cellnoiseF(const UT_Vector3 &P,
30  uint period_x = 0, uint period_y = 0,
31  uint period_z = 0);
32  template <bool TILED = false>
33  static float cellnoiseF(const UT_Vector4 &P,
34  uint period_x = 0, uint period_y = 0,
35  uint period_z = 0, uint period_w = 0);
36 
37  template <bool TILED = false>
38  static UT_Vector3 cellnoiseV(float P, uint period = 0);
39  template <bool TILED = false>
40  static UT_Vector3 cellnoiseV(const UT_Vector2 &P,
41  uint period_x = 0, uint period_y = 0);
42  template <bool TILED = false>
43  static UT_Vector3 cellnoiseV(const UT_Vector3 &P,
44  uint period_x = 0, uint period_y = 0,
45  uint period_z = 0);
46  template <bool TILED = false>
47  static UT_Vector3 cellnoiseV(const UT_Vector4 &P,
48  uint period_x = 0, uint period_y = 0,
49  uint period_z = 0, uint period_w = 0);
50 
51  template <bool TILED = false>
52  static void perlin(float &result, const UT_Vector2 &P,
53  uint period_x = 0, uint period_y = 0);
54  template <bool TILED = false>
55  static void perlin(float &result, const UT_Vector3 &P,
56  uint period_x = 0, uint period_y = 0, uint period_z = 0);
57  template <bool TILED = false>
58  static void perlin(UT_Vector3 &result, const UT_Vector2 &P,
59  uint period_x = 0, uint period_y = 0);
60  template <bool TILED = false>
61  static void perlin(UT_Vector3 &result, const UT_Vector3 &P,
62  uint period_x = 0, uint period_y = 0, uint period_z = 0);
63 
64  template <bool TILED = false>
65  static void worley(float &result, const UT_Vector2 &P, float jitter, int metric,
66  uint period_x = 0, uint period_y = 0);
67  template <bool TILED = false>
68  static void worley(UT_Vector2 &result, const UT_Vector2 &P, float jitter, int metric,
69  uint period_x = 0, uint period_y = 0);
70  template <bool TILED = false>
71  static void worley(UT_Vector3 &result, const UT_Vector2 &P, float jitter, int metric,
72  uint period_x = 0, uint period_y = 0);
73  template <bool TILED = false>
74  static void worley(float &result, const UT_Vector3 &P, float jitter, int metric,
75  uint period_x = 0, uint period_y = 0, uint period_z = 0);
76  template <bool TILED = false>
77  static void worley(UT_Vector2 &result, const UT_Vector3 &P, float jitter, int metric,
78  uint period_x = 0, uint period_y = 0, uint period_z = 0);
79  template <bool TILED = false>
80  static void worley(UT_Vector3 &result, const UT_Vector3 &P, float jitter, int metric,
81  uint period_x = 0, uint period_y = 0, uint period_z = 0);
82 
83  template <bool TILED = false>
84  static void voronoi(const UT_Vector2 &P, float jitter, int metric, float &d1, UT_Vector2 &p1,
85  uint period_x = 0, uint period_y = 0);
86  template <bool TILED = false>
87  static void voronoi(const UT_Vector2 &P, float jitter, int metric,
88  float &d1, float &d2, UT_Vector2 &p1, UT_Vector2 &p2,
89  uint period_x = 0, uint period_y = 0);
90  template <bool TILED = false>
91  static void voronoi(const UT_Vector2 &P, float jitter, int metric,
92  float &d1, float &d2, float &d3, UT_Vector2 &p1, UT_Vector2 &p2, UT_Vector2 &p3,
93  uint period_x = 0, uint period_y = 0);
94  template <bool TILED = false>
95  static void voronoi(const UT_Vector3 &P, float jitter, int metric, float &d1, UT_Vector3 &p1,
96  uint period_x = 0, uint period_y = 0, uint period_z = 0);
97  template <bool TILED = false>
98  static void voronoi(const UT_Vector3 &P, float jitter, int metric,
99  float &d1, float &d2, UT_Vector3 &p1, UT_Vector3 &p2,
100  uint period_x = 0, uint period_y = 0, uint period_z = 0);
101  template <bool TILED = false>
102  static void voronoi(const UT_Vector3 &P, float jitter, int metric,
103  float &d1, float &d2, float &d3, UT_Vector3 &p1, UT_Vector3 &p2, UT_Vector3 &p3,
104  uint period_x = 0, uint period_y = 0, uint period_z = 0);
105 
106 private:
107 };
108 
109 #endif
110 
#define UT_API
Definition: UT_API.h:14
**But if you need a result
Definition: thread.h:613
unsigned int uint
Definition: SYS_Types.h:45