Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#ifndef PERLINNOISE_H
Toshihiro Shimizu 890ddd
#define PERLINOISE_H
Shinya Kitaoka 42bfb6
Shinya Kitaoka 42bfb6
#include <memory></memory>
Shinya Kitaoka 42bfb6
Toshihiro Shimizu 890ddd
#include "tfxparam.h"
Toshihiro Shimizu 890ddd
#include "tspectrumparam.h"
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
enum { PNOISE_CLOUDS, PNOISE_WOODS };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class PerlinNoise {
Shinya Kitaoka 120a6e
  static int Size;
Shinya Kitaoka 120a6e
  static int TimeSize;
Shinya Kitaoka 120a6e
  static int Offset;
Shinya Kitaoka 120a6e
  static double Pixel_size;
Shinya Kitaoka 120a6e
  std::unique_ptr<float[]> Noise;</float[]>
Shinya Kitaoka 120a6e
  double LinearNoise(double x, double y, double t);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PerlinNoise();
Shinya Kitaoka 120a6e
  double Turbolence(double u, double v, double k, double grain);
Shinya Kitaoka 120a6e
  double Turbolence(double u, double v, double k, double grain, double min,
Shinya Kitaoka 120a6e
                    double max);
Shinya Kitaoka 120a6e
  double Marble(double u, double v, double k, double grain);
Shinya Kitaoka 120a6e
  double Marble(double u, double v, double k, double grain, double min,
Shinya Kitaoka 120a6e
                double max);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------*/
Shinya Kitaoka 120a6e
void doClouds(const TRasterP &ras, const TSpectrumParamP colors, TPointD pos,
Shinya Kitaoka 120a6e
              double evolution, double size, double min, double max, int type,
Shinya Kitaoka 120a6e
              double scale, double frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif