summaryrefslogtreecommitdiffstats
path: root/source/Noise.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Noise.cpp')
-rw-r--r--source/Noise.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/source/Noise.cpp b/source/Noise.cpp
index fb369c6a0..87b3bd4a5 100644
--- a/source/Noise.cpp
+++ b/source/Noise.cpp
@@ -18,56 +18,6 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Globals:
-
-void IntArrayLinearInterpolate2D(
- int * a_Array,
- int a_SizeX, int a_SizeY, // Dimensions of the array
- int a_AnchorStepX, int a_AnchorStepY // Distances between the anchor points in each direction
-)
-{
- // First interpolate columns where the anchor points are:
- int LastYCell = a_SizeY - a_AnchorStepY;
- for (int y = 0; y < LastYCell; y += a_AnchorStepY)
- {
- int Idx = a_SizeX * y;
- for (int x = 0; x < a_SizeX; x += a_AnchorStepX)
- {
- int StartValue = a_Array[Idx];
- int EndValue = a_Array[Idx + a_SizeX * a_AnchorStepY];
- int Diff = EndValue - StartValue;
- for (int CellY = 1; CellY < a_AnchorStepY; CellY++)
- {
- a_Array[Idx + a_SizeX * CellY] = StartValue + CellY * Diff / a_AnchorStepY;
- } // for CellY
- Idx += a_AnchorStepX;
- } // for x
- } // for y
-
- // Now interpolate in rows, each row has values in the anchor columns
- int LastXCell = a_SizeX - a_AnchorStepX;
- for (int y = 0; y < a_SizeY; y++)
- {
- int Idx = a_SizeX * y;
- for (int x = 0; x < LastXCell; x += a_AnchorStepX)
- {
- int StartValue = a_Array[Idx];
- int EndValue = a_Array[Idx + a_AnchorStepX];
- int Diff = EndValue - StartValue;
- for (int CellX = 1; CellX < a_AnchorStepX; CellX++)
- {
- a_Array[Idx + CellX] = StartValue + CellX * Diff / a_AnchorStepX;
- } // for CellY
- Idx += a_AnchorStepX;
- }
- }
-}
-
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cCubicCell2D:
class cCubicCell2D