2023-01-24 06:44:20 +01:00
|
|
|
#ifndef CG1_TRACER_CLOUDNOISE_H
|
|
|
|
#define CG1_TRACER_CLOUDNOISE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "noise.h"
|
2023-01-29 16:27:15 +01:00
|
|
|
#include "worleynoise.h"
|
|
|
|
#include "perlinnoise.h"
|
|
|
|
|
|
|
|
int const LOWRES_SIZE = 32;
|
2023-01-24 06:44:20 +01:00
|
|
|
|
2023-01-24 07:52:55 +01:00
|
|
|
class CloudNoise : public Noise
|
2023-01-24 06:44:20 +01:00
|
|
|
{
|
|
|
|
public:
|
2023-01-29 12:19:19 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param size
|
|
|
|
* @param seed 0 for random seed
|
|
|
|
*/
|
2023-01-29 16:27:15 +01:00
|
|
|
explicit CloudNoise(int size, unsigned int seed = 0);
|
|
|
|
|
|
|
|
void renderNoiseThread(int xOffset, int xSize);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Some worley noises
|
|
|
|
WorleyNoise worleyNoise1;
|
|
|
|
WorleyNoise worleyNoise3;
|
|
|
|
|
|
|
|
// Some perlin noises
|
|
|
|
PerlinNoise perlinNoise1;
|
|
|
|
PerlinNoise perlinNoise2;
|
|
|
|
|
|
|
|
static void runCloudNoiseInThread(int xOffset, int xSize, CloudNoise *noise);
|
2023-01-24 06:44:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //CG1_TRACER_CLOUDNOISE_H
|