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:
Remi Beges
2012-10-27 18:59:39 +02:00
parent 745b9dbbd1
commit 9fef43951b
25 changed files with 239 additions and 346 deletions

View File

@@ -12,29 +12,23 @@
#include <Nazara/Noise/Abstract4DNoise.hpp>
#include <Nazara/Math/Vector4.hpp>
template <typename T> class NzPerlin4D : public NzAbstract4DNoise<T>
class NAZARA_API NzPerlin4D : public NzAbstract4DNoise
{
public:
NzPerlin4D();
T GetValue(T x, T y, T z, T w, T resolution);
float GetValue(float x, float y, float z, float w, float resolution);
~NzPerlin4D() = default;
protected:
private:
int x0,y0,z0,w0;
int gi0,gi1,gi2,gi3,gi4,gi5,gi6,gi7,gi8,gi9,gi10,gi11,gi12,gi13,gi14,gi15;
int ii,jj,kk,ll;
int gradient4[32][4];
T Li1,Li2,Li3,Li4,Li5,Li6,Li7,Li8,Li9,Li10,Li11,Li12,Li13,Li14;
T s[4],t[4],u[4],v[4];
T Cx,Cy,Cz,Cw;
T tmp;
NzVector4<T> temp;
float gradient4[32][4];
float Li1,Li2,Li3,Li4,Li5,Li6,Li7,Li8,Li9,Li10,Li11,Li12,Li13,Li14;
float s[4],t[4],u[4],v[4];
float Cx,Cy,Cz,Cw;
float tmp;
NzVector4<float> temp;
};
typedef NzPerlin4D<float> NzPerlin4Df;
typedef NzPerlin4D<double> NzPerlin4Dd;
#include <Nazara/Noise/Perlin4D.inl>
#endif // PERLIN4D_HPP