// 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 #include #include #include #include #include using namespace std; template NzComplexNoiseBase::NzComplexNoiseBase() { m_parametersModified = true; m_lacunarity = 5.0f; m_hurst = 1.2f; m_octaves = 3.0f; for (int i(0) ; i < m_octaves; ++i) { exponent_array[i] = 0; } } template T NzComplexNoiseBase::GetLacunarity() const { return m_lacunarity; } template T NzComplexNoiseBase::GetHurstParameter() const { return m_hurst; } template T NzComplexNoiseBase::GetOctaveNumber() const { return m_octaves; } template void NzComplexNoiseBase::SetLacunarity(T lacunarity) { // if(lacunarity != m_lacunarity) //{ m_lacunarity = lacunarity; m_parametersModified = true; //} } template void NzComplexNoiseBase::SetHurstParameter(T h) { //if(h != m_hurst) //{ m_hurst = h; m_parametersModified = true; //} } template void NzComplexNoiseBase::SetOctavesNumber(T octaves) { if(octaves <= 30.0f) m_octaves = octaves; else m_octaves = 30.0f; m_parametersModified = true; } template void NzComplexNoiseBase::RecomputeExponentArray() { if(m_parametersModified) { cout<<"Recomputing exponent array"<(m_octaves) ; ++i) { exponent_array[i] = std::pow( frequency, -m_hurst ); cout<<"expo["<