diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2019-11-18 01:25:34 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2019-11-18 01:54:33 -0800 |
commit | 975c81262faa7ed06de56974064fd918a088bc1b (patch) | |
tree | b40620da4420fa3bd893593293edae211bdd9574 /src/libs/din/din.h | |
parent | 9d2838a1a8685a5bd47a9f5296176171632a2f6f (diff) |
libs/din: add a perlin noise implementation
This is a 3D noise field addressed as a unit cube.
The caller supplies the resolution of the noise field in three
dimensions.
I've just pulled in my v3f.h here, but it probably makes sense to
later on move vector headers into libs/ and share them. Later.
It's called din as in noise, because it's shorter than perlin and
noise.
Diffstat (limited to 'src/libs/din/din.h')
-rw-r--r-- | src/libs/din/din.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libs/din/din.h b/src/libs/din/din.h new file mode 100644 index 0000000..2e06072 --- /dev/null +++ b/src/libs/din/din.h @@ -0,0 +1,13 @@ +#ifndef _DIN_H +#define _DIN_H + +#include "v3f.h" + +typedef struct din_t din_t; + +din_t * din_new(int width, int height, int depth); +void din_free(din_t *din); +void din_randomize(din_t *din); +float din(din_t *din, v3f_t coordinate); + +#endif |