6 #ifndef _INC_cRandomPerlin_H
7 #define _INC_cRandomPerlin_H
36 inline float GRAYCALL SCurve(
float a);
37 inline float GRAYCALL LinearInterpolation(
float t,
float a,
float b);
39 inline void GRAYCALL Setup(
float i,
int& b0,
int& b1,
float& r0,
float& r1);
42 static void normalize2(
float v[2]);
43 static void normalize3(
float v[3]);
55 static const int k_SIZE = 256;
57 int m_p[k_SIZE + k_SIZE];
58 float m_g2[k_SIZE + k_SIZE][2];
61 float GetNoise2D(
float x,
float y);
63 void InitPerlinTables();
68 HRESULT CreateData2D(
float* pData,
int size,
float freq,
float& fMin,
float& fMax);
81 static const int k_SIZE = 0x1000;
83 int m_p[k_SIZE + k_SIZE + 2];
84 float m_g3[k_SIZE + k_SIZE + 2][3];
85 float m_g2[k_SIZE + k_SIZE + 2][2];
86 float m_g1[k_SIZE + k_SIZE + 2];
91 float GetNoise1D(
const float x);
92 float GetNoise2D(
const float x,
const float y);
93 float GetNoise3D(
const float x,
const float y,
const float z);
95 float turbulence2(
const float x,
const float y,
float freq);
96 float turbulence3(
const float x,
const float y,
const float z,
float freq);
98 float tileableNoise1(
const float x,
const float w);
99 float tileableNoise2(
const float x,
const float y,
const float w,
const float h);
100 float tileableNoise3(
const float x,
const float y,
const float z,
const float w,
const float h,
const float d);
102 float tileableTurbulence2(
const float x,
const float y,
const float w,
const float h,
float freq);
103 float tileableTurbulence3(
const float x,
const float y,
const float z,
const float w,
const float h,
const float d,
float freq);
105 void InitPerlinTables();
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cRandomFloat.h:21
Definition: cRandomPerlin.h:49
Definition: cRandomPerlin.h:74
Definition: cRandomPerlin.h:24
cRandomPerlinBase(cRandomFloat &rnd)
Definition: cRandomPerlin.h:31
cRandomFloat & m_rnd
Definition: cRandomPerlin.h:28
UNITTEST2_PREDEF(cRandomPerlin)
UNITTEST2_PREDEF(cQuadtree)
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22