You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
608 B

#include <iostream>
#include "terrain/yturbulence.h"
namespace vtk { namespace noise {
YTurbulence::YTurbulence(std::shared_ptr<NoiseModule> input, std::shared_ptr<NoiseModule> modifier) {
mInput = input;
mModifier = modifier;
}
YTurbulence::YTurbulence(std::shared_ptr<NoiseModule> input, std::shared_ptr<NoiseModule> modifier, const double& multiplier) {
mInput = input;
mModifier = modifier;
mMultiplier = multiplier;
}
double YTurbulence::get3D(const double&x, const double&y, const double&z) {
double mod = mModifier->get3D(x,y,z) * mMultiplier;
return mInput->get3D(x, y + mod, z);
}
}}