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:
@@ -12,33 +12,26 @@
|
||||
#include <Nazara/Noise/Abstract3DNoise.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
|
||||
template <typename T> class NzSimplex3D : public NzAbstract3DNoise<T>
|
||||
class NAZARA_API NzSimplex3D : public NzAbstract3DNoise
|
||||
{
|
||||
public:
|
||||
NzSimplex3D();
|
||||
T GetValue(T x, T y, T z, T resolution);
|
||||
float GetValue(float x, float y, float z, float resolution);
|
||||
~NzSimplex3D() = default;
|
||||
protected:
|
||||
private:
|
||||
int ii,jj,kk;
|
||||
int gi0,gi1,gi2,gi3;
|
||||
NzVector3i skewedCubeOrigin,off1,off2;
|
||||
T n1,n2,n3,n4;
|
||||
T c1,c2,c3,c4;
|
||||
T gradient3[12][3];
|
||||
T UnskewCoeff3D;
|
||||
T SkewCoeff3D;
|
||||
T sum;
|
||||
NzVector3<T> unskewedCubeOrigin, unskewedDistToOrigin;
|
||||
NzVector3<T> d1,d2,d3,d4;
|
||||
|
||||
|
||||
float n1,n2,n3,n4;
|
||||
float c1,c2,c3,c4;
|
||||
float gradient3[12][3];
|
||||
float UnskewCoeff3D;
|
||||
float SkewCoeff3D;
|
||||
float sum;
|
||||
NzVector3<float> unskewedCubeOrigin, unskewedDistToOrigin;
|
||||
NzVector3<float> d1,d2,d3,d4;
|
||||
};
|
||||
|
||||
typedef NzSimplex3D<float> NzSimplex3Df;
|
||||
typedef NzSimplex3D<double> NzSimplex3Dd;
|
||||
|
||||
#include <Nazara/Noise/Simplex3D.inl>
|
||||
|
||||
#endif // SIMPLEX3D_HPP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user