Files
NazaraEngine/include/Nazara/Noise/MixerBase.hpp
Jérôme Leclercq 56e9e7bae6 Noise: First pass of refactoring
Former-commit-id: 17c1cf4be282b0ebecf291b4c7858009376a3ad0 [formerly 8ff8938e7afcecdd5e677640d59608c8103e5558]
Former-commit-id: c88bb53bf67cd1997a6c40df757aededc0067f9f
2016-06-18 12:36:20 +02:00

43 lines
1021 B
C++

// 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_MIXERBASE_HPP
#define NAZARA_MIXERBASE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Noise/NoiseBase.hpp>
#include <array>
namespace Nz
{
class NAZARA_NOISE_API MixerBase
{
public:
MixerBase();
~MixerBase() = default;
virtual float Get(float x, float y, float scale) const = 0;
virtual float Get(float x, float y, float z, float scale) const = 0;
virtual float Get(float x, float y, float z, float w, float scale) const = 0;
float GetHurstParameter() const;
float GetLacunarity() const;
float GetOctaveNumber() const;
void SetParameters(float hurst, float lacunarity, float octaves);
protected:
float m_hurst;
float m_lacunarity;
float m_octaves;
std::vector<float> m_exponent_array;
float m_sum;
private:
void Recompute();
};
}
#endif // NAZARA_MIXERBASE_HPP