Waterflow
Visualize water in terrain
|
Struct used for returning a voxel and it's neighbours. More...
#include <voxel.h>
Public Attributes | |
voxel * | voxs [27] |
array of the voxels in the neighbourhood |
Struct used for returning a voxel and it's neighbours.
The voxels that get returned are ordered with the input voxel as the center voxel each coordinate loops from -1 to plus 1. x is the outermost coordinate, y in the middle and z the innermost variable. example voxs[5] (i.e the sixth element) will be 6-3 = 3 (increase y to 0) 3-3 = 0, three steps in z, gives z = 1; x = -1, y = 0, z = +1; in offsets from the center pixel.