diff options
author | madmaxoft <github@xoft.cz> | 2014-09-17 23:24:22 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-17 23:24:22 +0200 |
commit | 6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888 (patch) | |
tree | 82f189a39c14402c497cabffcaf57bcbb9ab1442 /src/VoronoiMap.h | |
parent | Updated SQLiteCpp. (diff) | |
download | cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar.gz cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar.bz2 cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar.lz cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar.xz cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.tar.zst cuberite-6f5aa487ed45f88f0fd0fc8bcd0d4af8d2d67888.zip |
Diffstat (limited to 'src/VoronoiMap.h')
-rw-r--r-- | src/VoronoiMap.h | 13 |
1 files changed, 12 insertions, 1 deletions
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 |