From 6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 17 Sep 2014 23:24:22 +0200 Subject: Voronoi biomegen: Added JitterSize and OddRowOffset. --- src/VoronoiMap.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/VoronoiMap.h') diff --git a/src/VoronoiMap.h b/src/VoronoiMap.h index 49f6c1da1..dfb11e9ce 100644 --- a/src/VoronoiMap.h +++ b/src/VoronoiMap.h @@ -40,7 +40,18 @@ public: /** Returns the value in the cell into which the specified point lies, and the distances to the 2 nearest Voronoi seeds. Uses a cache. */ - int GetValueAt(int a_X, int a_Y, int & a_MinDistance1, int & a_MinDistance2); + int GetValueAt( + int a_X, int a_Y, // Coords to query + int & a_NearestSeedX, int & a_NearestSeedY, // Coords of the closest cell's seed + int & a_MinDist2 // Distance to the second closest cell's seed + ); + + /** Finds the nearest and second nearest seeds, returns their coords. */ + void FindNearestSeeds( + int a_X, int a_Y, + int & a_NearestSeedX, int & a_NearestSeedY, + int & a_SecondNearestSeedX, int & a_SecondNearestSeedY + ); protected: /// The noise used for generating Voronoi seeds -- cgit v1.2.3