Fixed typo + minor errors
This commit is contained in:
parent
879a33878e
commit
23bb9da0bd
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef COMPLEXNOISEBASE_H
|
#ifndef COMPLEXNOISEBASE_HPP
|
||||||
#define COMPLEXNOISEBASE_H
|
#define COMPLEXNOISEBASE_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -14,7 +14,7 @@ class NAZARA_API NzComplexNoiseBase : public NzNoiseBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NzComplexNoiseBase();
|
NzComplexNoiseBase();
|
||||||
~NzComplexNoiseBase();
|
~NzComplexNoiseBase() = default;
|
||||||
|
|
||||||
void SetLacunarity(float lacunarity);
|
void SetLacunarity(float lacunarity);
|
||||||
void SetHurstParameter(float h);
|
void SetHurstParameter(float h);
|
||||||
|
|
@ -32,4 +32,4 @@ class NAZARA_API NzComplexNoiseBase : public NzNoiseBase
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMPLEXNOISEBASE_H
|
#endif // COMPLEXNOISEBASE_HPP
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
#include <Nazara/Noise/Config.hpp>
|
#include <Nazara/Noise/Config.hpp>
|
||||||
#if NAZARA_MODULENAME_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
|
#if NAZARA_NOISE_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
|
||||||
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
|
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
|
||||||
|
|
||||||
#define delete NzMemoryManager::NextFree(__FILE__, __LINE__), delete
|
#define delete NzMemoryManager::NextFree(__FILE__, __LINE__), delete
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,4 @@ class NAZARA_API NzNoise
|
||||||
static bool s_initialized;
|
static bool s_initialized;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOISE_H
|
#endif // NOISE_HPP
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef NOISEBASE_H
|
#ifndef NOISEBASE_HPP
|
||||||
#define NOISEBASE_H
|
#define NOISEBASE_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ class NAZARA_API NzNoiseBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NzNoiseBase(int seed = 0);
|
NzNoiseBase(int seed = 0);
|
||||||
virtual ~NzNoiseBase();
|
~NzNoiseBase() = default;
|
||||||
|
|
||||||
void SetNewSeed(int seed);
|
void SetNewSeed(int seed);
|
||||||
int GetUniformRandomValue();
|
int GetUniformRandomValue();
|
||||||
|
|
@ -30,4 +30,4 @@ class NAZARA_API NzNoiseBase
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOISEBASE_H
|
#endif // NOISEBASE_HPP
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@
|
||||||
#include <Nazara/Math/Vector3.hpp>
|
#include <Nazara/Math/Vector3.hpp>
|
||||||
#include <Nazara/Math/Vector4.hpp>
|
#include <Nazara/Math/Vector4.hpp>
|
||||||
|
|
||||||
//TODO : AMELIORER MELANGE TABLE PERMUTATION
|
|
||||||
// PB MULTIPLES APPELS SHUFFLEPERMUTATIONTABLE()
|
|
||||||
|
|
||||||
class NAZARA_API NzNoiseMachine : public NzComplexNoiseBase
|
class NAZARA_API NzNoiseMachine : public NzComplexNoiseBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -93,4 +90,4 @@ class NAZARA_API NzNoiseMachine : public NzComplexNoiseBase
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NOISEMACHINE_H
|
#endif // NOISEMACHINE_HPP
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef PERLIN2D_H
|
#ifndef PERLIN2D_HPP
|
||||||
#define PERLIN2D_H
|
#define PERLIN2D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -34,5 +34,5 @@ typedef NzPerlin2D<double> NzPerlin2Dd;
|
||||||
|
|
||||||
#include <Nazara/Noise/Perlin2D.inl>
|
#include <Nazara/Noise/Perlin2D.inl>
|
||||||
|
|
||||||
#endif // PERLIN2D_H
|
#endif // PERLIN2D_HPP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef PERLIN3D_H
|
#ifndef PERLIN3D_HPP
|
||||||
#define PERLIN3D_H
|
#define PERLIN3D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -37,4 +37,4 @@ typedef NzPerlin3D<double> NzPerlin3Dd;
|
||||||
|
|
||||||
#include <Nazara/Noise/Perlin3D.inl>
|
#include <Nazara/Noise/Perlin3D.inl>
|
||||||
|
|
||||||
#endif // PERLIN3D_H
|
#endif // PERLIN3D_HPP
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef PERLIN4D_H
|
#ifndef PERLIN4D_HPP
|
||||||
#define PERLIN4D_H
|
#define PERLIN4D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -37,4 +37,4 @@ typedef NzPerlin4D<double> NzPerlin4Dd;
|
||||||
|
|
||||||
#include <Nazara/Noise/Perlin4D.inl>
|
#include <Nazara/Noise/Perlin4D.inl>
|
||||||
|
|
||||||
#endif // PERLIN4D_H
|
#endif // PERLIN4D_HPP
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef SIMPLEX2D_H
|
#ifndef SIMPLEX2D_HPP
|
||||||
#define SIMPLEX2D_H
|
#define SIMPLEX2D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -39,5 +39,5 @@ typedef NzSimplex2D<double> NzSimplex2Dd;
|
||||||
|
|
||||||
#include <Nazara/Noise/Simplex2D.inl>
|
#include <Nazara/Noise/Simplex2D.inl>
|
||||||
|
|
||||||
#endif // SIMPLEX2D_H
|
#endif // SIMPLEX2D_HPP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef SIMPLEX3D_H
|
#ifndef SIMPLEX3D_HPP
|
||||||
#define SIMPLEX3D_H
|
#define SIMPLEX3D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
@ -39,5 +39,5 @@ typedef NzSimplex3D<double> NzSimplex3Dd;
|
||||||
|
|
||||||
#include <Nazara/Noise/Simplex3D.inl>
|
#include <Nazara/Noise/Simplex3D.inl>
|
||||||
|
|
||||||
#endif // SIMPLEX3D_H
|
#endif // SIMPLEX3D_HPP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef SIMPLEX4D_H
|
#ifndef SIMPLEX4D_HPP
|
||||||
#define SIMPLEX4D_H
|
#define SIMPLEX4D_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Noise/NoiseBase.hpp>
|
#include <Nazara/Noise/NoiseBase.hpp>
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,3 @@ void NzComplexNoiseBase::RecomputeExponentArray()
|
||||||
m_parametersModified = false;
|
m_parametersModified = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NzComplexNoiseBase::~NzComplexNoiseBase()
|
|
||||||
{
|
|
||||||
//dtor
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
#include <Nazara/Noise/Config.hpp>
|
#include <Nazara/Noise/Config.hpp>
|
||||||
#if NAZARA_MODULENAME_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
|
#if NAZARA_NOISE_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
|
||||||
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
|
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
@ -26,4 +26,5 @@ void operator delete[](void* pointer) throw()
|
||||||
{
|
{
|
||||||
NzMemoryManager::Free(pointer, true);
|
NzMemoryManager::Free(pointer, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -55,3 +55,5 @@ bool NzNoise::IsInitialized()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NzNoise::s_initialized = false;
|
bool NzNoise::s_initialized = false;
|
||||||
|
|
||||||
|
//#include <Nazara/Core/DebugOff.hpp> //A INCLURE ?
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ void NzNoiseBase::ShufflePermutationTable()
|
||||||
int xchanger;
|
int xchanger;
|
||||||
unsigned int ncase;
|
unsigned int ncase;
|
||||||
|
|
||||||
|
for(int i(0) ; i < 256 ; i++)
|
||||||
|
perm[i] = i;
|
||||||
|
|
||||||
for(int j(0) ; j < 20 ; ++j)
|
for(int j(0) ; j < 20 ; ++j)
|
||||||
for (int i(0); i < 256 ; ++i)
|
for (int i(0); i < 256 ; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -72,21 +75,4 @@ int NzNoiseBase::JenkinsHash(int a, int b, int c)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#include <Nazara/Core/DebugOff.hpp>
|
||||||
//key = 64 bits
|
|
||||||
public long hash64shift(long key)
|
|
||||||
{
|
|
||||||
key = (~key) + (key << 21); // key = (key << 21) - key - 1;
|
|
||||||
key = key ^ (key >>> 24);
|
|
||||||
key = (key + (key << 3)) + (key << 8); // key * 265
|
|
||||||
key = key ^ (key >>> 14);
|
|
||||||
key = (key + (key << 2)) + (key << 4); // key * 21
|
|
||||||
key = key ^ (key >>> 28);
|
|
||||||
key = key + (key << 31);
|
|
||||||
return key;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
NzNoiseBase::~NzNoiseBase()
|
|
||||||
{
|
|
||||||
//dtor
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -758,3 +758,5 @@ float NzNoiseMachine::Get3DHybridMultiFractalNoiseValue(float x, float y, float
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <Nazara/Core/DebugOff.hpp>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue