Noise: Refresh module using ZNoise
https://github.com/Overdrivr/ZNoise Former-commit-id: ea7bbeb58a7147934523e2f600b1bd02f1cae5ed [formerly 581ab53941abbda68e00417592240f52ebd482e6] Former-commit-id: e948aca78eb101292f0458365cfa39e6564d0462
This commit is contained in:
36
include/Nazara/Noise/Perlin.hpp
Normal file
36
include/Nazara/Noise/Perlin.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2016 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#ifndef NAZARA_PERLIN_HPP
|
||||
#define NAZARA_PERLIN_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Noise/Config.hpp>
|
||||
#include <Nazara/Noise/NoiseBase.hpp>
|
||||
#include <initializer_list>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_NOISE_API Perlin : public NoiseBase
|
||||
{
|
||||
public:
|
||||
Perlin();
|
||||
Perlin(unsigned int seed);
|
||||
~Perlin() = default;
|
||||
|
||||
float Get(std::initializer_list<float> coordinates, float scale) const;
|
||||
|
||||
protected:
|
||||
float _2D(std::initializer_list<float> coordinates, float scale) const;
|
||||
float _3D(std::initializer_list<float> coordinates, float scale) const;
|
||||
float _4D(std::initializer_list<float> coordinates, float scale) const;
|
||||
|
||||
private:
|
||||
const float gradient2[8][2];
|
||||
const float gradient3[16][3];
|
||||
const float gradient4[32][4];
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_PERLIN_HPP
|
||||
Reference in New Issue
Block a user