rust/landgen/src/lib.rs
changeset 14126 69db1d2e4cec
parent 14105 4d22be35cfa2
child 14212 bb2f301d4fe0
--- a/rust/landgen/src/lib.rs	Sat Nov 03 17:40:21 2018 +0100
+++ b/rust/landgen/src/lib.rs	Sat Nov 03 18:29:58 2018 +0100
@@ -10,14 +10,18 @@
     zero: T,
     basic: T,
     distance_divisor: u32,
+    skip_distort: bool,
+    skip_bezier: bool,
 }
 
 impl<T: Copy + PartialEq> LandGenerationParameters<T> {
-    pub fn new(zero: T, basic: T) -> Self {
+    pub fn new(zero: T, basic: T, distance_divisor: u32, skip_distort: bool, skip_bezier: bool) -> Self {
         Self {
             zero,
             basic,
-            distance_divisor: 1,
+            distance_divisor,
+            skip_distort,
+            skip_bezier,
         }
     }
 }
@@ -25,7 +29,7 @@
 pub trait LandGenerator {
     fn generate_land<T: Copy + PartialEq, I: Iterator<Item = u32>>(
         &self,
-        parameters: LandGenerationParameters<T>,
+        parameters: &LandGenerationParameters<T>,
         random_numbers: &mut I,
     ) -> land2d::Land2D<T>;
 }