[opengtl-commits] [586] make Perlin constants as parameters

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 586
Author:   cyrille
Date:     2009-03-06 21:50:59 +0100 (Fri, 06 Mar 2009)

Log Message:
-----------
make Perlin constants as parameters

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/PerlinNoise.shiva


Modified: trunk/OpenGTL/OpenShiva/tests/imagegenerators/PerlinNoise.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/PerlinNoise.shiva	2009-03-06 20:50:29 UTC (rev 585)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/PerlinNoise.shiva	2009-03-06 20:50:59 UTC (rev 586)
@@ -1,16 +1,53 @@
+<
+  parameters: <
+    amount: <
+      label: "Amount";
+      type: float;
+    >;
+    offset: <
+      label: "Amount";
+      type: float;
+    >;
+    factor: <
+      label: "Amount";
+      type: float;
+      defaultValue: 1.0;
+      maxValue: 10.0;
+    >;
+    xscale: <
+      label: "Horizontal scale";
+      type: float;
+      defaultValue: 4.0;
+      maxValue: 100.0;
+    >;
+    yscale: <
+      label: "Horizontal scale";
+      type: float;
+      defaultValue: 4.0;
+      maxValue: 100.0;
+    >;
+    octaves: <
+      label: "Octaves";
+      type: int;
+      defaultValue: 2;
+      maxValue:10;
+    >;
+    width: <
+      label: "Image width";
+      type: int;
+      defaultValue: 800;
+      maxValue:10000;
+    >;
+    height: <
+      label: "Image height";
+      type: int;
+      defaultValue: 600;
+      maxValue:10000;
+    >;
+  >;
+>;
 kernel PerlinNoise
 {
-  const float amount = 0.5;
-  const float offset = 0.0;
-  const float factor = 1.0;
-  const float xscale = 4.0;
-  const float yscale = 4.0;
-  
-  const int width = 800;
-  const int height = 600;
-  
-  const int octaves = 2;
-  
   const int RAND_MAX  = 2147483647;
 
   dependent float grad_x[64];


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/