Blender V2.61 - r43446
Defines | Functions | Variables

WAVELET_NOISE.h File Reference

#include <MERSENNETWISTER.h>

Go to the source code of this file.

Defines

#define NOISE_TILE_SIZE   128
#define modFast128(x)   ((x) & 127)
#define modFast64(x)   ((x) & 63)
#define DOWNCOEFFS

Functions

static void downsampleX (float *from, float *to, int n)
static void downsampleY (float *from, float *to, int n)
static void downsampleZ (float *from, float *to, int n)
static void downsampleNeumann (const float *from, float *to, int n, int stride)
static void downsampleXNeumann (float *to, const float *from, int sx, int sy, int sz)
static void downsampleYNeumann (float *to, const float *from, int sx, int sy, int sz)
static void downsampleZNeumann (float *to, const float *from, int sx, int sy, int sz)
static void upsampleX (float *from, float *to, int n)
static void upsampleY (float *from, float *to, int n)
static void upsampleZ (float *from, float *to, int n)
static void upsampleNeumann (const float *from, float *to, int n, int stride)
static void upsampleXNeumann (float *to, const float *from, int sx, int sy, int sz)
static void upsampleYNeumann (float *to, const float *from, int sx, int sy, int sz)
static void upsampleZNeumann (float *to, const float *from, int sx, int sy, int sz)
static bool loadTile (float *const noiseTileData, std::string filename)
static void saveTile (float *const noiseTileData, std::string filename)
static void generateTile_WAVELET (float *const noiseTileData, std::string filename)
static float WNoiseDx (Vec3 p, float *data)
static float WNoiseDy (Vec3 p, float *data)
static float WNoiseDz (Vec3 p, float *data)

Variables

static const char tilefile_headerstring [] = "Noise Tile File rev. "
static const char tilefile_revision [] = "001"
static const int noiseTileSize = NOISE_TILE_SIZE
static float _upCoeffs [4] = {0.25f, 0.75f, 0.75f, 0.25f}

Detailed Description

Definition in file WAVELET_NOISE.h.


Define Documentation

#define DOWNCOEFFS
Value:
0.000334f,-0.001528f, 0.000410f, 0.003545f,-0.000938f,-0.008233f, 0.002172f, 0.019120f, \
                  -0.005040f,-0.044412f, 0.011655f, 0.103311f,-0.025936f,-0.243780f, 0.033979f, 0.655340f, \
                   0.655340f, 0.033979f,-0.243780f,-0.025936f, 0.103311f, 0.011655f,-0.044412f,-0.005040f, \
                   0.019120f, 0.002172f,-0.008233f,-0.000938f, 0.003546f, 0.000410f,-0.001528f, 0.000334f

Definition at line 63 of file WAVELET_NOISE.h.

Referenced by downsampleNeumann(), downsampleX(), downsampleY(), and downsampleZ().

#define modFast128 (   x)    ((x) & 127)
#define modFast64 (   x)    ((x) & 63)

Definition at line 62 of file WAVELET_NOISE.h.

Referenced by upsampleX(), upsampleY(), and upsampleZ().

#define NOISE_TILE_SIZE   128

Definition at line 57 of file WAVELET_NOISE.h.

Referenced by WTURBULENCE::WVelocity(), and WTURBULENCE::WVelocityWithJacobian().


Function Documentation

static void downsampleNeumann ( const float *  from,
float *  to,
int  n,
int  stride 
) [static]

Definition at line 105 of file WAVELET_NOISE.h.

References DOWNCOEFFS, and i.

Referenced by downsampleXNeumann(), downsampleYNeumann(), and downsampleZNeumann().

static void downsampleX ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 71 of file WAVELET_NOISE.h.

References DOWNCOEFFS, i, and modFast128.

Referenced by generateTile_WAVELET().

static void downsampleXNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 126 of file WAVELET_NOISE.h.

References downsampleNeumann(), and i.

Referenced by WTURBULENCE::decomposeEnergy().

static void downsampleY ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 81 of file WAVELET_NOISE.h.

References DOWNCOEFFS, i, and modFast128.

Referenced by generateTile_WAVELET().

static void downsampleYNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 133 of file WAVELET_NOISE.h.

References downsampleNeumann(), and i.

Referenced by WTURBULENCE::decomposeEnergy().

static void downsampleZ ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 91 of file WAVELET_NOISE.h.

References DOWNCOEFFS, i, and modFast128.

Referenced by generateTile_WAVELET().

static void downsampleZNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 140 of file WAVELET_NOISE.h.

References downsampleNeumann(), and i.

Referenced by WTURBULENCE::decomposeEnergy().

static void generateTile_WAVELET ( float *const  noiseTileData,
std::string  filename 
) [static]
static bool loadTile ( float *const  noiseTileData,
std::string  filename 
) [static]

Definition at line 224 of file WAVELET_NOISE.h.

References isnan(), noiseTileSize, NULL, strlen(), tilefile_headerstring, and tilefile_revision.

Referenced by generateTile_WAVELET().

static void saveTile ( float *const  noiseTileData,
std::string  filename 
) [static]

Definition at line 284 of file WAVELET_NOISE.h.

References noiseTileSize, NULL, strlen(), tilefile_headerstring, and tilefile_revision.

Referenced by generateTile_WAVELET().

static void upsampleNeumann ( const float *  from,
float *  to,
int  n,
int  stride 
) [static]

Definition at line 183 of file WAVELET_NOISE.h.

References _upCoeffs, and i.

Referenced by upsampleXNeumann(), upsampleYNeumann(), and upsampleZNeumann().

static void upsampleX ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 152 of file WAVELET_NOISE.h.

References _upCoeffs, i, modFast64, and p.

Referenced by generateTile_WAVELET().

static void upsampleXNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 198 of file WAVELET_NOISE.h.

References i, and upsampleNeumann().

Referenced by WTURBULENCE::decomposeEnergy().

static void upsampleY ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 161 of file WAVELET_NOISE.h.

References _upCoeffs, i, modFast64, and p.

Referenced by generateTile_WAVELET().

static void upsampleYNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 205 of file WAVELET_NOISE.h.

References i, and upsampleNeumann().

Referenced by WTURBULENCE::decomposeEnergy().

static void upsampleZ ( float *  from,
float *  to,
int  n 
) [static]

Definition at line 170 of file WAVELET_NOISE.h.

References _upCoeffs, i, modFast64, and p.

Referenced by generateTile_WAVELET().

static void upsampleZNeumann ( float *  to,
const float *  from,
int  sx,
int  sy,
int  sz 
) [static]

Definition at line 212 of file WAVELET_NOISE.h.

References i, and upsampleNeumann().

Referenced by WTURBULENCE::decomposeEnergy().

static float WNoiseDx ( Vec3  p,
float *  data 
) [inline, static]
static float WNoiseDy ( Vec3  p,
float *  data 
) [inline, static]
static float WNoiseDz ( Vec3  p,
float *  data 
) [inline, static]

Variable Documentation

float _upCoeffs[4] = {0.25f, 0.75f, 0.75f, 0.25f} [static]

Definition at line 151 of file WAVELET_NOISE.h.

Referenced by upsampleNeumann(), upsampleX(), upsampleY(), and upsampleZ().

const int noiseTileSize = NOISE_TILE_SIZE [static]
const char tilefile_headerstring[] = "Noise Tile File rev. " [static]

Definition at line 54 of file WAVELET_NOISE.h.

Referenced by loadTile(), and saveTile().

const char tilefile_revision[] = "001" [static]

Definition at line 55 of file WAVELET_NOISE.h.

Referenced by loadTile(), and saveTile().