NzNoise new architecture + Perlin 1D algorithm modified
This commit is contained in:
30
include/Nazara/Noise/NoiseBase.hpp
Normal file
30
include/Nazara/Noise/NoiseBase.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NOISEBASE_H
|
||||
#define NOISEBASE_H
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
|
||||
class NzNoiseBase
|
||||
{
|
||||
public:
|
||||
NzNoiseBase(int seed = 0);
|
||||
virtual ~NzNoiseBase();
|
||||
|
||||
void SetNewSeed(int seed);
|
||||
int GetUniformRandomValue();
|
||||
void ShufflePermutationTable();
|
||||
protected:
|
||||
int perm[512];
|
||||
private:
|
||||
int Ua, Uc, Um;
|
||||
int UcurrentSeed;
|
||||
int Uprevious, Ulast;
|
||||
|
||||
};
|
||||
|
||||
#endif // NOISEBASE_H
|
||||
Reference in New Issue
Block a user