space-game001/Perlin.h
Vladislav Khorev 7c272a2ee6 Refactoring
2025-12-15 21:47:45 +03:00

24 lines
485 B
C++

#pragma once
#include <vector>
#include <cstdint>
#include "ZLMath.h"
namespace ZL {
class PerlinNoise {
std::vector<int> p;
public:
PerlinNoise();
PerlinNoise(uint64_t seed);
float fade(float t);
float lerp(float t, float a, float b);
float grad(int hash, float x, float y, float z);
float noise(float x, float y, float z);
float getSurfaceHeight(Vector3f pos, float noiseCoeff);
};
} // namespace ZL