mantaflow  0.10
A framework for fluid simulation
Classes | Macros
noisefield.h File Reference
#include "vectorbase.h"
#include "manta.h"
#include "grid.h"

Go to the source code of this file.

Classes

class  Manta::WaveletNoiseField
 

Macros

#define NOISE_TILE_SIZE   128
 
#define modFast128(x)   ((x) & 127)
 
#define ADD_WEIGHTED(x, y, z)
 
#define ADD_WEIGHTEDX(x, y, z)
 
#define ADD_WEIGHTEDY(x, y, z)
 
#define ADD_WEIGHTEDZ(x, y, z)
 

Macro Definition Documentation

◆ ADD_WEIGHTED

#define ADD_WEIGHTED (   x,
  y,
 
)
Value:
weight = 1.0f;\
xC = modFast128(midX + (x));\
weight *= w[0][(x) + 1];\
yC = modFast128(midY + (y));\
weight *= w[1][(y) + 1];\
zC = modFast128(midZ + (z));\
weight *= w[2][(z) + 1];\
result += weight * data[(zC * NOISE_TILE_SIZE + yC) * NOISE_TILE_SIZE + xC];

◆ ADD_WEIGHTEDX

#define ADD_WEIGHTEDX (   x,
  y,
 
)
Value:
weight = dw[0][(x) + 1] * w[1][(y) + 1] * w[2][(z) + 1];\
result += weight * neighbors[x + 1][y + 1][z + 1];

◆ ADD_WEIGHTEDY

#define ADD_WEIGHTEDY (   x,
  y,
 
)
Value:
weight = w[0][(x) + 1] * dw[1][(y) + 1] * w[2][(z) + 1];\
result += weight * neighbors[x + 1][y + 1][z + 1];

◆ ADD_WEIGHTEDZ

#define ADD_WEIGHTEDZ (   x,
  y,
 
)
Value:
weight = w[0][(x) + 1] * w[1][(y) + 1] * dw[2][(z) + 1];\
result += weight * neighbors[x + 1][y + 1][z + 1];