Fix neighbours issue in off-axis walk code
This commit is contained in:
parent
4649658a9b
commit
40cc47e07a
@ -116,28 +116,31 @@ const static size_t NEIGHBOURS = 26;
|
||||
// this has to be done separately...
|
||||
void DLASystem::setPosNeighbour(double setpos[], double pos[], int val) {
|
||||
const static double offsets[NEIGHBOURS][3] = {
|
||||
// These 6 are first to represent the 6 immediate neighbours of the cell when checking sticking
|
||||
{1, 0, 0},
|
||||
{-1, 0, 0},
|
||||
{0, 1, 0},
|
||||
{0, -1, 0},
|
||||
{0, 0, 1},
|
||||
{0, 0, -1},
|
||||
|
||||
// The off-axis neighbours
|
||||
{-1, -1, -1},
|
||||
{-1, -1, 0},
|
||||
{-1, -1, 1},
|
||||
{-1, 0, -1},
|
||||
{-1, 0, 0},
|
||||
{-1, 0, 1},
|
||||
{-1, 1, -1},
|
||||
{-1, 1, 0},
|
||||
{-1, 1, 1},
|
||||
{0, -1, -1},
|
||||
{0, -1, 0},
|
||||
{0, -1, 1},
|
||||
{0, 0, -1},
|
||||
{0, 0, 1},
|
||||
{0, 1, -1},
|
||||
{0, 1, 0},
|
||||
{0, 1, 1},
|
||||
{1, -1, -1},
|
||||
{1, -1, 0},
|
||||
{1, -1, 1},
|
||||
{1, 0, -1},
|
||||
{1, 0, 0},
|
||||
{1, 0, 1},
|
||||
{1, 1, -1},
|
||||
{1, 1, 0},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user