Replaced templates by float
*Since only valid template parameters were float and double, the whole template aspect has been removed. Double precision would only be used in extremely rare occasions (applications needing high precision and slow performances), it is not relevant to template the whole module for it. Former-commit-id: fc6dd028189c608a6a7b4c312b3e5e3f53a01fd7
This commit is contained in:
@@ -8,33 +8,31 @@
|
||||
#define COMPLEXNOISEBASE_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <array>
|
||||
|
||||
template <typename T>
|
||||
class NzComplexNoiseBase
|
||||
class NAZARA_API NzComplexNoiseBase
|
||||
{
|
||||
public:
|
||||
NzComplexNoiseBase();
|
||||
~NzComplexNoiseBase() = default;
|
||||
|
||||
T GetOctaveNumber() const;
|
||||
T GetLacunarity() const;
|
||||
T GetHurstParameter() const;
|
||||
void SetLacunarity(T lacunarity);
|
||||
void SetHurstParameter(T h);
|
||||
void SetOctavesNumber(T octaves);
|
||||
const std::array<float, 30>& GetExponentArray() const; //For debug purpose
|
||||
float GetHurstParameter() const;
|
||||
float GetLacunarity() const;
|
||||
float GetOctaveNumber() const;
|
||||
void SetHurstParameter(float h);
|
||||
void SetLacunarity(float lacunarity);
|
||||
void SetOctavesNumber(float octaves);
|
||||
void RecomputeExponentArray();
|
||||
|
||||
protected:
|
||||
T m_lacunarity;
|
||||
T m_hurst;
|
||||
T m_octaves;
|
||||
T exponent_array[30];
|
||||
T m_sum;
|
||||
float m_lacunarity;
|
||||
float m_hurst;
|
||||
float m_octaves;
|
||||
std::array<float, 30> exponent_array;
|
||||
float m_sum;
|
||||
private:
|
||||
bool m_parametersModified;
|
||||
|
||||
};
|
||||
|
||||
#include<Nazara/Noise/ComplexNoiseBase.inl>
|
||||
|
||||
#endif // COMPLEXNOISEBASE_HPP
|
||||
|
||||
Reference in New Issue
Block a user