Modifications for the new architecture

to fullfill mixer implementation requirements
*Added FBM2D, first complex noise class of the new architecture
*Removed NoiseMachine, because was redundant and not fitting with the new
architecture
*Minor changes to almost every other noise class (mostly adding 'this->')
everywhere an inherited member from template base class was called from
the inherited class
This commit is contained in:
Remi Beges
2012-10-02 19:55:35 +02:00
parent a41a2ddcb3
commit 3f8e3cfb60
21 changed files with 295 additions and 994 deletions

View File

@@ -8,28 +8,33 @@
#define COMPLEXNOISEBASE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Noise/NoiseBase.hpp>
class NAZARA_API NzComplexNoiseBase : public NzNoiseBase
template <typename T>
class NzComplexNoiseBase
{
public:
NzComplexNoiseBase();
~NzComplexNoiseBase() = default;
void SetLacunarity(float lacunarity);
void SetHurstParameter(float h);
void SetOctavesNumber(float octaves);
T GetOctaveNumber() const;
T GetLacunarity() const;
T GetHurstParameter() const;
void SetLacunarity(T lacunarity);
void SetHurstParameter(T h);
void SetOctavesNumber(T octaves);
void RecomputeExponentArray();
protected:
float m_lacunarity;
float m_hurst;
float m_octaves;
float exponent_array[30];
float m_sum;
T m_lacunarity;
T m_hurst;
T m_octaves;
T exponent_array[30];
T m_sum;
private:
bool m_parametersModified;
};
#include<Nazara/Noise/ComplexNoiseBase.inl>
#endif // COMPLEXNOISEBASE_HPP