27 lines
530 B
C++
27 lines
530 B
C++
#ifndef CG1_TRACER_NOISE_H
|
|
#define CG1_TRACER_NOISE_H
|
|
|
|
#include <vector>
|
|
#include "common/vector3d.h"
|
|
|
|
class Vector3d;
|
|
|
|
class Noise
|
|
{
|
|
public:
|
|
Noise(int size);
|
|
|
|
float getNoise(Vector3d point) const;
|
|
float getNoise(float x, float y, float z) const;
|
|
|
|
bool invert = false;
|
|
|
|
protected:
|
|
std::vector<float> noiseMap; // Noise map
|
|
int size; // Size of the noise map
|
|
|
|
void generateNoiseMap(int size);
|
|
void setNoise(int x, int y, int z, float value);
|
|
};
|
|
|
|
#endif //CG1_TRACER_NOISE_H
|