mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
tested out and commented out some new stuff for the terrain generator, to be used in the future.
This commit is contained in:
parent
664eb4f7c5
commit
ffb1128951
5 changed files with 314 additions and 29 deletions
24
src/noise.h
24
src/noise.h
|
@ -41,5 +41,29 @@ double noise3d_perlin(double x, double y, double z, int seed,
|
|||
double noise3d_perlin_abs(double x, double y, double z, int seed,
|
||||
int octaves, double persistence);
|
||||
|
||||
class NoiseBuffer
|
||||
{
|
||||
public:
|
||||
NoiseBuffer();
|
||||
~NoiseBuffer();
|
||||
|
||||
void clear();
|
||||
void create(int seed, int octaves, double persistence,
|
||||
double pos_scale,
|
||||
double first_x, double first_y, double first_z,
|
||||
double last_x, double last_y, double last_z,
|
||||
double samplelength_x, double samplelength_y, double samplelength_z);
|
||||
|
||||
void intSet(int x, int y, int z, double d);
|
||||
double intGet(int x, int y, int z);
|
||||
double get(double x, double y, double z);
|
||||
|
||||
private:
|
||||
double *m_data;
|
||||
double m_start_x, m_start_y, m_start_z;
|
||||
double m_samplelength_x, m_samplelength_y, m_samplelength_z;
|
||||
int m_size_x, m_size_y, m_size_z;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue