Added FBM 3D & 4D and HybridMultiFractal 2D + cleaned code
this commit will change the scale of values produced by fbm2d. This will probably not happen again. As a consequence, fbm values will always be constrained between -1 and 1, but do not perfectly stick to that scale. There is no easy solution, if the user wants the best dynamic between -1 and 1, he should adjust manually the value by multiplying by a gain slightly superior to 1. Former-commit-id: ebdba9e9f4bbb972abe355c07ec9f8bce42329b9
This commit is contained in:
29
include/Nazara/Noise/HybridMultifractal2D.hpp
Normal file
29
include/Nazara/Noise/HybridMultifractal2D.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// 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 HYBRIDMULTIFRACTAL2D_HPP
|
||||
#define HYBRIDMULTIFRACTAL2D_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Noise/ComplexNoiseBase.hpp>
|
||||
#include <Nazara/Noise/Abstract2DNoise.hpp>
|
||||
|
||||
class NAZARA_API NzHybridMultiFractal2D : public NzAbstract2DNoise, public NzComplexNoiseBase
|
||||
{
|
||||
public:
|
||||
NzHybridMultiFractal2D(nzNoises source, int seed);
|
||||
float GetValue(float x, float y, float resolution);
|
||||
~NzHybridMultiFractal2D();
|
||||
protected:
|
||||
private:
|
||||
NzAbstract2DNoise* m_source;
|
||||
float m_value;
|
||||
float m_remainder;
|
||||
nzNoises m_noiseType;
|
||||
};
|
||||
|
||||
#endif // HYBRIDMULTIFRACTAL2D_HPP
|
||||
|
||||
Reference in New Issue
Block a user