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.

yturbulence.cpp 608B

1234567891011121314151617181920212223
  1. #include <iostream>
  2. #include "terrain/yturbulence.h"
  3. namespace vtk { namespace noise {
  4. YTurbulence::YTurbulence(std::shared_ptr<NoiseModule> input, std::shared_ptr<NoiseModule> modifier) {
  5. mInput = input;
  6. mModifier = modifier;
  7. }
  8. YTurbulence::YTurbulence(std::shared_ptr<NoiseModule> input, std::shared_ptr<NoiseModule> modifier, const double& multiplier) {
  9. mInput = input;
  10. mModifier = modifier;
  11. mMultiplier = multiplier;
  12. }
  13. double YTurbulence::get3D(const double&x, const double&y, const double&z) {
  14. double mod = mModifier->get3D(x,y,z) * mMultiplier;
  15. return mInput->get3D(x, y + mod, z);
  16. }
  17. }}